From 167ba0fead3c4488e79f2c894ad2b435d3344cb8 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 (#2) Co-authored-by: cavivie --- .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