From bed249f4d36e05dff9694e4b891348744e1b420e Mon Sep 17 00:00:00 2001 From: jmug Date: Wed, 17 Jun 2026 21:26:58 -0700 Subject: [PATCH] chore: Use gitea packages as the container registry. --- .github/workflows/docker.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5c9a3f7f..5728ca36 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,6 +7,9 @@ on: pull_request: branches: - "handmade" + release: + types: + - published jobs: publish: @@ -20,24 +23,32 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Resolve registry host + id: registry + run: echo "host=${GITHUB_SERVER_URL#*://}" >> "$GITHUB_OUTPUT" - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: handmadecities/handmade-revolt-web-client + images: ${{ steps.registry.outputs.host }}/${{ github.repository_owner }}/handmade-revolt-web-client + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=raw,value=latest env: DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index - - name: Login to DockerHub - uses: docker/login-action@v1 - if: github.event_name != 'pull_request' + - name: Login to registry + uses: docker/login-action@v3 + if: github.event_name == 'release' with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ${{ steps.registry.outputs.host }} + username: ${{ github.actor }} + password: ${{ github.token }} - name: Build and publish uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name == 'release' }} platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} annotations: ${{ steps.meta.outputs.annotations }}