Skip to content

Update nginx.conf

Update nginx.conf #13

name: validate nginx
on:
pull_request:
paths:
- 'nginx.conf'
- '.github/workflows/validate-nginx.yml'
jobs:
validate-nginx:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-node@v4.1.0
- name: install
run: |
sudo apt-get update -qq
sudo apt-get install -qq nginx
- name: validate
shell: bash
run: |
sudo useradd -M nginx
shopt -s globstar
set -eux
for f in **/nginx*.conf; do
if ! sudo nginx -t -c "$(cd "$(dirname "$f")" && pwd)/$(basename "$f")"; then
exit 1
fi
done
exit 0