From 8dcbe4db9d187f5d7beb8e114025f506e4584bfc Mon Sep 17 00:00:00 2001 From: ImFurina <222616389+MoeFurina@users.noreply.github.com> Date: Mon, 6 Oct 2025 20:28:44 +0800 Subject: [PATCH] ci: add ghcr imagine --- .github/workflows/Build_Image.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/Build_Image.yml b/.github/workflows/Build_Image.yml index 80671b7..4b965ec 100644 --- a/.github/workflows/Build_Image.yml +++ b/.github/workflows/Build_Image.yml @@ -6,6 +6,10 @@ on: tags: ["v*"] workflow_dispatch: +permissions: + contents: read + packages: write + jobs: build-and-push: runs-on: ubuntu-latest @@ -25,6 +29,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -33,4 +44,6 @@ jobs: tags: | moefurina/ncm-api:latest moefurina/ncm-api:${{ env.VERSION }} + ghcr.io/moefurina/ncm-api:latest + ghcr.io/moefurina/ncm-api:${{ env.VERSION }} platforms: linux/amd64