pez-infra/.github/workflows/validate-caddyfile.yml
dependabot[bot] ef31162b2d
chore(deps): bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [actions/cache](https://github.com/actions/cache).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `actions/cache` from 5 to 6
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-01 16:09:36 +00:00

33 lines
1.1 KiB
YAML

name: Validate Caddyfile
on:
pull_request:
jobs:
caddy-validate:
name: caddy validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Check for Caddyfile
id: check
run: |
if [ -f ansible/services/caddy/Caddyfile ]; then
echo "has_file=true" >> "$GITHUB_OUTPUT"
else
echo "has_file=false" >> "$GITHUB_OUTPUT"
echo "No Caddyfile found — skipping."
fi
- name: Validate Caddyfile
if: steps.check.outputs.has_file == 'true'
run: |
# Official download API serves the latest binary directly — no
# unauthenticated api.github.com call (which is rate-limited to
# 60/hr per IP across shared runners and would 403). -f makes curl
# fail loudly on an HTTP error instead of saving an error page.
curl -fsSL "https://caddyserver.com/api/download?os=linux&arch=amd64" -o caddy
chmod +x caddy
./caddy add-package github.com/caddy-dns/hetzner@v2.0.0
./caddy validate --config ansible/services/caddy/Caddyfile --adapter caddyfile