mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-19 15:33:08 +01:00
34 lines
990 B
YAML
34 lines
990 B
YAML
name: create-rule-meta.json
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout self repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Checkout hayabusa-rules
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: Yamato-Security/hayabusa-rules
|
|
path: hayabusa-rules
|
|
|
|
- name: Run
|
|
run: cd wela-extractor && cargo run --release -- ../hayabusa-rules ../config/eid_subcategory_mapping.csv ../config/security_rules.json
|
|
|
|
- name: Push changes
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
git add *.json
|
|
git commit -m "Automated update"
|
|
if [ "$(git log -1 --pretty=%B)" = "Automated update" ]; then
|
|
git push origin main
|
|
fi
|