Skip to content

Commit

Permalink
Enable GCP login and artifact upload
Browse files Browse the repository at this point in the history
  • Loading branch information
oskirby committed Sep 10, 2024
1 parent 1b2ea73 commit 79e7809
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ jobs:
with:
images: |
${{ vars.DOCKERHUB_REPO }}
# ${{ vars.GAR_LOCATION }}-docker.pkg.dev/${{ vars.GCP_PROJECT_ID }}/${{ vars.GAR_REPOSITORY}}/autograph-edge
${{ vars.GAR_LOCATION }}-docker.pkg.dev/${{ vars.GCP_PROJECT_ID }}/${{ vars.GAR_REPOSITORY}}/autograph-edge
tags: |
type=semver,pattern={{raw}}
type=raw,value=latest,enable={{is_default_branch}}
#- id: gcp-auth
# uses: google-github-actions/auth@v2
# with:
# token_format: 'access_token'
# service_account: artifact-writer@${{ vars.GCP_PROJECT_ID}}.iam.gserviceaccount.com
# workload_identity_provider: ${{ vars.GCPV2_GITHUB_WORKLOAD_IDENTITY_PROVIDER }}
- id: gcp-auth
uses: google-github-actions/auth@v2
with:
token_format: 'access_token'
service_account: artifact-writer@${{ vars.GCP_PROJECT_ID}}.iam.gserviceaccount.com
workload_identity_provider: ${{ vars.GCPV2_GITHUB_WORKLOAD_IDENTITY_PROVIDER }}

#- name: Login to Google Artifact Registry
# uses: docker/login-action@v3
# with:
# registry: ${{ vars.GAR_LOCATION }}-docker.pkg.dev
# username: oauth2accesstoken
# password: ${{ steps.gcp-auth.outputs.access_token }}
- name: Login to Google Artifact Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.GAR_LOCATION }}-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.gcp-auth.outputs.access_token }}

- name: Login to Dockerhub
uses: docker/login-action@v3
Expand Down

0 comments on commit 79e7809

Please sign in to comment.