From d85220d54e65b549b30bf36862ab019f7d69cb64 Mon Sep 17 00:00:00 2001 From: Gustavo Valverde Date: Fri, 22 Mar 2024 09:48:35 +0100 Subject: [PATCH] fix(build): always login to DockerHub --- .github/workflows/sub-build-docker-image.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sub-build-docker-image.yml b/.github/workflows/sub-build-docker-image.yml index 92dd106b46c..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 }} @@ -156,7 +155,6 @@ jobs: driver: cloud endpoint: "zfnd/zebra" driver-opts: | - network=host image=moby/buildkit:v0.13.0 # Build and push image to Google Artifact Registry, and possibly DockerHub