-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.29 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
52
53
54
55
56
name: Create encrypted rule package
on:
workflow_dispatch:
schedule:
- cron: '30 20 * * *'
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 rules
mv ./config ./rules/
mv ./hayabusa ./rules/
mv ./sigma ./rules/
- name: Zip directory
run: |
sudo apt-get install zip
zip -r -P yamato-security-hayabusa rules.zip ./rules
- name: Checkout self repository
uses: actions/checkout@v4
with:
path: './self'
- name: Copy zip to self repository
run: |
cp ./rules.zip ./self
- name: Configure Git
run: |
cd ./self
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit changes
run: |
cd ./self
git add rules.zip
git commit -m "Automated update"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ./self
git push origin main