Skip to content

Commit

Permalink
add explicit login step for artifact registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Vanbuskirk committed Sep 21, 2023
1 parent bef3eb2 commit 93b9a47
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
permissions:
contents: write
packages: write
id-token: write

jobs:
Release:
Expand All @@ -30,9 +31,20 @@ jobs:
id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
token_format: 'access_token'
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}

- name: Docker Login to Google Artifact Registry
uses: docker/login-action@v2
with:
registry: gcr.io
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- run: |-
echo ${{ steps.auth.outputs.access_token }} | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev
- name: Docker Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand Down

0 comments on commit 93b9a47

Please sign in to comment.