Merge traefik config to main #24
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: Caddy | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "docker/caddy/**" | |
workflow_dispatch: | |
jobs: | |
format: | |
name: Format Caddyfile | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: $ | |
- name: Setup Docker | |
uses: docker/setup-qemu-action@v3 | |
- name: Format Caddyfile | |
run: docker run --rm -v $(pwd)/docker/proxy/Caddyfile:/Caddyfile caddy:2 caddy fmt /Caddyfile | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Actions: Auto format Caddyfile" | |
commit_user_name: Github Actions | |
build-image: | |
name: Build Caddy (custom image w/ Cloudflare) | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: "./docker/proxy" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: "Login to GitHub Container Registry" | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: Build Image | |
run: | | |
docker build . --tag ghcr.io/orangeunilabs/caddy:latest | |
- name: Push Image | |
run: | | |
docker push ghcr.io/orangeunilabs/caddy:latest |