Skip to content

Create encrypted rule package #3

Create encrypted rule package

Create encrypted rule package #3

name: Create encrypted rule package
on:
workflow_dispatch:
jobs:
zip-and-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: 'Yamato-Security/hayabusa-rules'
- name: Extract directory
run: |
mkdir extracted
cp -r ./config ./extracted
cp -r ./hayabusa ./extracted
cp -r ./sigma ./extracted
- name: Zip directory
run: |
sudo apt-get install zip
zip -r -P yamato-security-hayabusa encrypted-hayabusa-rules.zip ./extracted
- name: Checkout self repository
uses: actions/checkout@v4
with:
path: './self'
- name: Copy zip to self repository
run: |
cp ./encrypted-hayabusa-rules.zip ./self
- name: Commit and push if changes
run: |
cd ./self
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
else
git commit -m "Add updated encrypted-hayabusa-rules.zip"
git push