add job to validate nginx config #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nginx Configuration Validation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: {} | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
if: github.repository == 'chainguard-dev/edu' | |
permissions: | |
contents: read | |
steps: | |
- name: 'Github Actions Runner' | |
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 | |
with: | |
egress-policy: audit | |
- name: 'Checkout default branch to $GITHUB_WORKSPACE dir' | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run Nginx validation | |
run: | | |
mkdir -p public | |
touch public/_aliases | |
docker run --rm -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf -v $(pwd)/public/_aliases:/etc/nginx/aliases cgr.dev/chainguard/nginx:latest-dev -t |