Skip to content

Commit

Permalink
us-central1-docker.pkg.dev auth for docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
isarkis committed Sep 15, 2024
1 parent e72bb9e commit 2957704
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ runs:
METADATA="http://metadata.google.internal./computeMetadata/v1"
SVC_ACCT="${METADATA}/instance/service-accounts/default"
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
printf ${ACCESS_TOKEN} | docker login -u oauth2accesstoken --password-stdin https://us-central1-docker.pkg.dev
full_git_sha=${{ github.sha }}
echo "DOCKER_TAG=us-central1-docker.pkg.dev/${PROJECT_NAME}/${{ inputs.docker_service }}:${GIT_SHA}" >> $GITHUB_ENV
echo "DOCKER_FLOATING_TAG=us-central1-docker.pkg.dev/${PROJECT_NAME}/${{ inputs.docker_service }}:${FLOATING_TAG}" >> $GITHUB_ENV
echo "DOCKER_TAG=us-central1-docker.pkg.dev/${PROJECT_NAME}/github/${{ inputs.docker_service }}:${GIT_SHA}" >> $GITHUB_ENV
echo "DOCKER_FLOATING_TAG=us-central1-docker.pkg.dev/${PROJECT_NAME}/github/${{ inputs.docker_service }}:${FLOATING_TAG}" >> $GITHUB_ENV
shell: bash
# Proceed with docker pull, build, tag, and push.
- name: Docker Pull
Expand Down

0 comments on commit 2957704

Please sign in to comment.