mirror of
https://github.com/fabriziosalmi/patterns.git
synced 2025-12-18 10:15:51 +00:00
Update update_patterns.yml
This commit is contained in:
parent
7dfe508add
commit
034d133d1c
11
.github/workflows/update_patterns.yml
vendored
11
.github/workflows/update_patterns.yml
vendored
@ -50,19 +50,14 @@ jobs:
|
||||
run: |
|
||||
python owasp2nginx.py
|
||||
continue-on-error: false
|
||||
|
||||
- name: 🔍 Check for Changes
|
||||
id: git-check
|
||||
run: |
|
||||
git diff --quiet waf_patterns || echo "changes=true" >> $GITHUB_ENV
|
||||
|
||||
- name: 🚀 Commit and Push Changes
|
||||
if: env.changes == 'true'
|
||||
# Ensure conf files are pushed even if no changes detected
|
||||
- name: 🚀 Commit and Push Caddy and Nginx WAF Configs
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add waf_patterns/caddy/*.conf waf_patterns/nginx/*.conf
|
||||
git commit -m "Automated update: OWASP CRS to Caddy and Nginx WAF rules [$(date)]"
|
||||
git commit -m "Automated update: OWASP CRS to Caddy and Nginx WAF rules [$(date)]" || echo "No changes to commit"
|
||||
git push
|
||||
continue-on-error: true # Continue even if no changes are made
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user