Skip to content

Commit

Permalink
Add workflow to validate Caddy config
Browse files Browse the repository at this point in the history
  • Loading branch information
RDMurray committed Dec 8, 2023
1 parent 72841ff commit 640e23b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/validate-caddy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Validate Caddyfiles

on:
push:
branches: [ main ]
paths:
- svcs/data/caddy/**
- .github/workflows/validate-caddy.yml
pull_request:
branches: [ main ]
paths:
- svcs/data/caddy/**
- .github/workflows/validate-caddy.yml

jobs:
validate:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Caddy
run: |
curl -sSLo caddy.tar.gz "https://github.com/caddyserver/caddy/releases/download/v2.4.6/caddy_2.4.6_linux_amd64.tar.gz"
tar xzvf caddy.tar.gz caddy
sudo mv caddy /usr/local/bin/
caddy version
- name: Verify Caddyfile.blue
run: caddy validate --config ./svcs/data/caddy/Caddyfile.blue

- name: Verify Caddyfile.green
run: caddy validate --config ./svcs/data/caddy/Caddyfile.green

0 comments on commit 640e23b

Please sign in to comment.