-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.27 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
48
49
50
51
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: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit changes
run: |
git add encrypted-hayabusa-rules.zip
git commit -m "Automated update"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin main