mirror of
https://github.com/fabriziosalmi/patterns.git
synced 2025-12-17 17:55:48 +00:00
Update nginx.yml
This commit is contained in:
parent
325888949a
commit
c7b9ec7241
11
.github/workflows/nginx.yml
vendored
11
.github/workflows/nginx.yml
vendored
@ -19,16 +19,25 @@ jobs:
|
|||||||
- name: Download WAF rules
|
- name: Download WAF rules
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/fabriziosalmi/patterns/releases/download/latest/nginx_waf.zip -O nginx_waf.zip
|
wget https://github.com/fabriziosalmi/patterns/releases/download/latest/nginx_waf.zip -O nginx_waf.zip
|
||||||
|
echo "Downloaded nginx_waf.zip"
|
||||||
|
ls -lh nginx_waf.zip
|
||||||
|
|
||||||
|
- name: Extract WAF rules
|
||||||
|
run: |
|
||||||
unzip nginx_waf.zip -d waf_rules
|
unzip nginx_waf.zip -d waf_rules
|
||||||
|
echo "Extracted WAF rules into waf_rules directory"
|
||||||
|
ls -lh waf_rules
|
||||||
|
|
||||||
- name: Verify WAF rules extraction
|
- name: Verify WAF rules extraction
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d "waf_rules" ]; then
|
if [ ! -d "waf_rules" ]; then
|
||||||
echo "Error: WAF rules directory not found!"
|
echo "Error: WAF rules directory not found after extraction!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -z "$(ls -A waf_rules/*.conf 2>/dev/null)" ]; then
|
if [ -z "$(ls -A waf_rules/*.conf 2>/dev/null)" ]; then
|
||||||
echo "Error: No .conf files found in waf_rules!"
|
echo "Error: No .conf files found in waf_rules!"
|
||||||
|
echo "Contents of waf_rules:"
|
||||||
|
ls -l waf_rules
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user