CI: caddy validate van beide Caddyfiles in de test-job #28

Merged
rve merged 2 commits from fix/issue-26-ci-caddy-validate into main 2026-07-12 19:04:29 +00:00
Showing only changes of commit 6bf8bad5fb - Show all commits

View File

@@ -11,6 +11,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
# The test image below swaps in Caddyfile.test, so the production
# Caddyfile is otherwise never exercised by CI — an invalid config then
# only surfaces when the deploy health-gate fails, after the broken
# container already replaced the healthy one (issue #20/#26). Validate
# both files up front so a parse error fails the PR check in seconds.
- name: Validate Caddyfiles
run: |
docker run --rm -v "$PWD":/workspace -w /workspace caddy:2-alpine \
caddy validate --config Caddyfile --adapter caddyfile
docker run --rm -v "$PWD":/workspace -w /workspace caddy:2-alpine \
caddy validate --config Caddyfile.test --adapter caddyfile
- name: Build Docker image
run: docker build -t learning-platform .