Login to Google Cloud and generate oauth token
This commit is contained in:
parent
a7e58ea99d
commit
f452b08462
|
@ -31,13 +31,21 @@ jobs:
|
|||
install: true
|
||||
buildkitd-flags: --debug
|
||||
|
||||
# Login to Google Cloud
|
||||
- name: 'Login to Google Cloud'
|
||||
uses: 'google-github-actions/auth@v0'
|
||||
id: auth
|
||||
with:
|
||||
token_format: 'access_token'
|
||||
credentials_json: '${{ secrets.GCR_SA_KEY }}'
|
||||
|
||||
# Login to GCR
|
||||
- name: Login to GCR
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: us-docker.pkg.dev
|
||||
username: _json_key
|
||||
password: ${{ secrets.GCR_SA_KEY }}
|
||||
username: oauth2accesstoken
|
||||
password: ${{ steps.auth.outputs.access_token }}
|
||||
|
||||
# Build and push the image, leveraging layer caching
|
||||
- name: Build and Push
|
||||
|
|
Loading…
Reference in New Issue