commit 8e84df14177710414c638ad164ca0db70a17e2db Author: Julien Valverdé Date: Mon Sep 8 17:41:25 2025 +0200 Initial commit diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..7455f12 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,55 @@ +name: Build +run-name: Build +on: + pull_request: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to Container Registry + if: ${{ gitea.event_name != 'pull_request' }} + uses: docker/login-action@v3 + with: + registry: docker.valverde.cloud + username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} + password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} + + - name: Parse Caddy version + id: version + run: echo "version=$(grep -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]+$' ./Dockerfile | cut -d ':' -f2)" | tee -a $GITEA_OUTPUT + + - name: Generate Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + docker.valverde.cloud/${{ gitea.repository }} + tags: | + type=semver,pattern={{version}},value=v${{ steps.version.outputs.version }} + type=semver,pattern={{major}}.{{minor}},value=v${{ steps.version.outputs.version }} + type=semver,pattern={{major}},value=v${{ steps.version.outputs.version }} + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr + type=sha + flavor: | + latest=true + + - name: Build + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: ${{ gitea.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..50ca5ad --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM caddy:2.10.2-builder AS builder +RUN --mount=type=cache,target=/go/pkg/mod \ + --mount=type=cache,target=/root/.cache/go-build \ + xcaddy build \ + --with github.com/greenpau/caddy-security@v1.1.31 \ + --with github.com/hslatman/caddy-crowdsec-bouncer/crowdsec@v0.9.2 \ + --with github.com/caddy-dns/namecheap@master + +FROM caddy:2.10.2 +COPY --from=builder /usr/bin/caddy /usr/bin/caddy diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..bc32b2e --- /dev/null +++ b/renovate.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "dependencyDashboard": true, + "dependencyDashboardTitle": "Renovate Dashboard", + "assignees": ["thilawyn"], + "labels": ["renovate"], + "configMigration": true, + "prHourlyLimit": 0, + "docker-compose": { + "hostRules": [ + { + "matchHost": "docker.io", + "concurrentRequestLimit": 2 + } + ] + } +}