nginx-ultimate-bad-bot-blocker/.github/workflows/action.yml
2021-07-05 08:42:12 +02:00

75 lines
1.8 KiB
YAML

# Build Script for Nginx Ultimate Bad Bot Blocker using GHA
#
name: CI
defaults:
run:
shell: bash
on:
push:
branches:
- master
pull_request:
branches:
- master
#services:
# nginx:
# image: nginx
# Map port 8080 on the Docker host to port 80 on the nginx container
# ports:
# - 8080:80
jobs:
build:
#if: "!contains(github.event.head_commit.message, 'skipci')"
#if: "contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Software
run: |
sudo apt -y install dos2unix
- name: Configure Nginx - Stage 1
shell: bash
run: |
echo "export TERM=xterm" >> ~/.bashrc
source ~/.bashrc
sudo systemctl enable nginx
sudo systemctl start nginx
sudo nginx -t
sudo systemctl reload nginx
ls -la /etc/nginx/sites-available
ls -la /etc/nginx/sites-enabled
cat /etc/nginx/sites-available/default
./dev-tools/generate-files.sh
./dev-tools/install-nginx-1.sh
- name: Test Blocker - Stage 1
shell: bash
run: |
./dev-tools/test-blocker-false-positives.sh
./dev-tools/test-blocker-quick.sh
./dev-tools/test-blocker-badwords.sh
./dev-tools/test-blocker-whitelist-domains.sh
./dev-tools/test-blocker-whitelist-ips.sh
./dev-tools/test-blocker-rate-limiting.sh
./dev-tools/test-blocker-whitelist.sh
- name: Debug
shell: bash
run: |
sudo cat /etc/nginx/sites-available/default.vhost
sudo nginx -t
sudo netstat -napt
cat /etc/nginx/nginx.conf
sudo systemctl list-units --type=service --all
if: always()