feat: also publish docker image to ghcr

This commit is contained in:
Nya Candy
2026-07-04 10:13:08 +08:00
parent 6a430d4e15
commit 7e586e92be
+12
View File
@@ -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