Skip to content

Commit

Permalink
Use access token
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuan-chen committed Oct 16, 2024
1 parent 16b14f0 commit 8d41935
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ jobs:
id: auth
uses: google-github-actions/auth@v2
with:
create_credentials_file: 'true'
token_format: 'access_token'
workload_identity_provider: '${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.SERVICE_ACCOUNT }}'

- id: 'gcloud'
name: 'gcloud'
run: |-
gcloud auth login --brief --cred-file="${{ steps.auth.outputs.credentials_file_path }}"
gcloud services list
- name: Docker Auth
id: docker-auth
uses: 'docker/login-action@v1'
with:
username: 'oauth2accesstoken'
password: '${{ steps.auth.outputs.access_token }}'
registry: ${{ env.DOCKER_REGISTRY }}

- name: Push to GCP
run: |
Expand Down

0 comments on commit 8d41935

Please sign in to comment.