From daeae98d07caae7ec0c8a3f6f7bcd5c5bff74518 Mon Sep 17 00:00:00 2001 From: cavivie Date: Fri, 29 Mar 2024 14:52:21 +0800 Subject: [PATCH] fix: docker login right registry when non-pr --- .github/workflows/docker-publish.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 239c11e..3e11769 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -11,6 +11,9 @@ on: pull_request: branches: [ "main" ] +env: + REGISTRY: 'ghcr.io' + jobs: build: runs-on: windows-2022 @@ -52,6 +55,7 @@ jobs: - name: Build and push docker image for win-dev-base uses: ./.github/actions/docker-build-push with: + registry: ${{ env.REGISTRY }} push: ${{ github.event_name != 'pull_request' }} tag: win-dev-base context: win-dev-base @@ -59,6 +63,7 @@ jobs: - name: Build and push docker image for win-dev-rust uses: ./.github/actions/docker-build-push with: + registry: ${{ env.REGISTRY }} push: ${{ github.event_name != 'pull_request' }} tag: win-dev-rust context: win-dev-rust @@ -66,6 +71,7 @@ jobs: - name: Build and push docker image for alrd-windows uses: ./.github/actions/docker-build-push with: + registry: ${{ env.REGISTRY }} push: ${{ github.event_name != 'pull_request' }} tag: alrd-windows context: win-alrd-rsxe @@ -73,6 +79,7 @@ jobs: - name: Build and push docker image for rsxe-windows uses: ./.github/actions/docker-build-push with: + registry: ${{ env.REGISTRY }} push: ${{ github.event_name != 'pull_request' }} tag: rsxe-windows context: win-alrd-rsxe