From 3fb4b2d0b15b9be1d20f569feeb6e77d36728f32 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Mon, 23 Sep 2024 12:33:36 -0700 Subject: [PATCH] [Docker] Fix the docker auth step (#4144) b/369130578 --- .github/actions/docker/action.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/docker/action.yaml b/.github/actions/docker/action.yaml index 10e7f3fc7bdb..d32282f52506 100644 --- a/.github/actions/docker/action.yaml +++ b/.github/actions/docker/action.yaml @@ -61,8 +61,11 @@ runs: echo "DOCKER_TAG=${docker_tag}" >> $GITHUB_ENV shell: bash - name: Set up Cloud SDK - if: ${{ (steps.changed-files.outputs.any_changed == 'true') && (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.fork) }} uses: isarkis/setup-gcloud@40dce7857b354839efac498d3632050f568090b6 # v1.1.1 + - name: Configure Docker auth for GCloud + shell: bash + run: | + gcloud auth configure-docker - name: Set Docker Tag id: set-docker-tag-presubmit-fork env: @@ -76,7 +79,6 @@ runs: ACCESS_TOKEN=$(curl -H 'Metadata-Flavor: Google' ${SVC_ACCT}/token | cut -d'"' -f 4) printf ${ACCESS_TOKEN} | docker login -u oauth2accesstoken --password-stdin https://gcr.io echo "DOCKER_TAG=gcr.io/${PROJECT_NAME}/${{inputs.docker_image}}:pr-${GITHUB_EVENT_NUMBER}" >> $GITHUB_ENV - gcloud auth configure-docker shell: bash - name: Process Docker metadata id: process-docker-metadata