add caddy as http option to support h2c for redirect/dep updates/some fixes

Update zoeyvid/nginx-quic Docker tag to v113
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2023-04-30 23:58:41 +02:00
parent b2e6cbcb8d
commit 9f53ae7593
9 changed files with 117 additions and 15 deletions

29
.github/workflows/caddy-fmt.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: caddy-fmt
on:
push:
branches:
- develop
paths:
- .github/workflows/caddy-fmt.yml
- Caddy.Dockerfile
- Caddyfile
workflow_dispatch:
jobs:
caddy-fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Read version
id: version
run: echo "version=$(cat Caddy.Dockerfile | grep -wE "FROM caddy:*" | head -1 | sed "s|FROM caddy:||g")" >> $GITHUB_OUTPUT
- name: caddy-fmt
run: |
docker run --rm -v ${{ github.workspace }}/Caddyfile:/etc/caddy/Caddyfile caddy:${{ steps.version.outputs.version }} caddy fmt --overwrite /etc/caddy/Caddyfile
- name: push changes
run: |
git add -A
git config user.name "GitHub"
git config user.email "noreply@github.com"
git diff-index --quiet HEAD || git commit -sm "caddy-fmt"
git push

50
.github/workflows/caddy.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Build Caddy Image
on:
push:
branches:
- develop
paths:
- .github/workflows/caddy.yml
- Caddy.Dockerfile
- Caddyfile
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64 #all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Convert Username
id: un
run: echo "un=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ steps.un.outputs.un }}
password: ${{ github.token }}
- name: Build
uses: docker/build-push-action@v4
if: ${{ github.event_name != 'pull_request' }}
with:
context: .
file: ./Caddy.Dockerfile
platforms: linux/amd64,linux/arm64 #,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4 #,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:caddy
ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:caddy

View File

@@ -1,9 +1,5 @@
name: Build Docker Image
on:
workflow_run:
workflows: ["Build frontend"]
types:
- completed
push:
branches:
- develop