From 325888949a1cdedcd411881eec96bc30e01d8847 Mon Sep 17 00:00:00 2001 From: fab Date: Tue, 7 Jan 2025 19:04:51 +0100 Subject: [PATCH] Update nginx.yml --- .github/workflows/nginx.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nginx.yml b/.github/workflows/nginx.yml index 902f2c2..6fab215 100644 --- a/.github/workflows/nginx.yml +++ b/.github/workflows/nginx.yml @@ -21,9 +21,27 @@ jobs: wget https://github.com/fabriziosalmi/patterns/releases/download/latest/nginx_waf.zip -O nginx_waf.zip unzip nginx_waf.zip -d waf_rules + - name: Verify WAF rules extraction + run: | + if [ ! -d "waf_rules" ]; then + echo "Error: WAF rules directory not found!" + exit 1 + fi + if [ -z "$(ls -A waf_rules/*.conf 2>/dev/null)" ]; then + echo "Error: No .conf files found in waf_rules!" + exit 1 + fi + + - name: Verify nginx.conf exists + run: | + if [ ! -f "tests/nginx.conf" ]; then + echo "Error: tests/nginx.conf not found in the repository!" + exit 1 + fi + - name: Combine Nginx configuration run: | - cat nginx.conf waf_rules/*.conf > combined_nginx.conf + cat tests/nginx.conf waf_rules/*.conf > combined_nginx.conf echo "Combined Nginx configuration:" cat combined_nginx.conf