diff --git a/.github/workflows/docker-image.yml b/.forgejo/workflows/docker-image.yml similarity index 58% rename from .github/workflows/docker-image.yml rename to .forgejo/workflows/docker-image.yml index 0d6bf34..1e9d9d7 100644 --- a/.github/workflows/docker-image.yml +++ b/.forgejo/workflows/docker-image.yml @@ -1,23 +1,22 @@ name: Publish Docker image on: push: - branches: main - tags: - - '*' + branches: + - main jobs: push_to_registry: - name: Push Docker image to GitHub Packages + name: Push Docker image to Forgejo Packages runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | - ghcr.io/wbrawner/caddy-porkbun + git.wbrawner.com/wbrawner/caddy-porkbun tags: | type=schedule type=ref,event=branch @@ -26,16 +25,20 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha + - name: Set up Docker context + run: docker context create builders - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/setup-buildx-action@v3 with: - registry: ghcr.io + endpoint: builders + - name: Login to Container Registry + uses: docker/login-action@v3 + with: + registry: git.wbrawner.com username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.FORGEJO_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/Dockerfile b/Dockerfile index 97e1ec5..a60377d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM caddy:2-builder-alpine AS builder +FROM docker.io/caddy:2-builder-alpine AS builder RUN xcaddy build --with github.com/caddy-dns/porkbun@v0.2.1 -FROM caddy:2-alpine +FROM docker.io/caddy:2-alpine LABEL org.opencontainers.image.source=https://github.com/wbrawner/caddy-porkbun COPY --from=builder /usr/bin/caddy /usr/bin/caddy