diff --git a/.github/workflows/sub-build-docker-image.yml b/.github/workflows/sub-build-docker-image.yml index 01f6d25ecda..fc7c5d2fd89 100644 --- a/.github/workflows/sub-build-docker-image.yml +++ b/.github/workflows/sub-build-docker-image.yml @@ -92,6 +92,8 @@ jobs: uses: docker/metadata-action@v5.5.1 with: # list of Docker images to use as base name for tags + # We only publish images to DockerHub if a release is not a pre-release + # Ref: https://github.com/orgs/community/discussions/26281#discussioncomment-3251177 images: | us-docker.pkg.dev/${{ vars.GCP_PROJECT }}/zebra/${{ inputs.image_name }} zfnd/${{ inputs.image_name }},enable=${{ github.event_name == 'release' && !github.event.release.prerelease }} @@ -139,9 +141,6 @@ jobs: password: ${{ steps.auth.outputs.access_token }} - name: Login to DockerHub - # We only publish images to DockerHub if a release is not a pre-release - # Ref: https://github.com/orgs/community/discussions/26281#discussioncomment-3251177 - if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} uses: docker/login-action@v3.1.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }}