From 7e586e92be0bb050ee136b82f4cdefa31bb9f6a2 Mon Sep 17 00:00:00 2001 From: Nya Candy Date: Sat, 4 Jul 2026 10:13:08 +0800 Subject: [PATCH] feat: also publish docker image to ghcr --- .github/workflows/docker-publish.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 29882904..b1b060d0 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -59,6 +59,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 360 needs: test + permissions: + contents: read + packages: write steps: - name: Checkout uses: actions/checkout@v4 @@ -93,6 +96,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and Push Multi-Arch Image uses: docker/build-push-action@v6 with: @@ -102,6 +112,8 @@ jobs: tags: | ${{ env.REGISTRY_IMAGE }}:${{ env.VERSION }} ${{ env.REGISTRY_IMAGE }}:latest + ghcr.io/${{ github.repository }}:${{ env.VERSION }} + ghcr.io/${{ github.repository }}:latest cache-from: type=gha cache-to: type=gha,mode=max # GitHub Actions env piped through so build.rs stamps