-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.21 KB
/
create-encrypted-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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