-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (29 loc) · 998 Bytes
/
collect-rules.yml
File metadata and controls
37 lines (29 loc) · 998 Bytes
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
name: 3 Hour sync for collecting Detection Rules
on:
workflow_dispatch:
schedule:
- cron: '0 */3 * * *'
permissions:
contents: write
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install required packages
run: pip install aboutcode.pipeline==0.2.1 fetchcode==0.8.2 plyara==2.2.8 suricataparser==1.0.0
- name: Run sync
run: python rules_collector.py
- name: Commit and push if it changed
run: |-
git config user.name "AboutCode Automation"
git config user.email "automation@aboutcode.org"
git add -A
timestamp=$(date -u)
git commit -m "$(echo -e "Sync Collecting Detection Rules: $timestamp\n\nSigned-off-by: AboutCode Automation <automation@aboutcode.org>")" || exit 0
git push