Skip to content

Update gcp-artifact-registry.yml #4

Update gcp-artifact-registry.yml

Update gcp-artifact-registry.yml #4

name: Release
on:
push:
jobs:
docker-release:
name: Tagged Docker release to Google Artifact Registry
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v2
- id: auth
name: Authenticate with Google Cloud
uses: google-github-actions/auth@v0
with:
token_format: access_token
workload_identity_provider: projects/363816104163/locations/global/workloadIdentityPools/pv-labs-pool/providers/pv-labs-workload-provider
service_account: [email protected]
access_token_lifetime: 300s
- name: Login to Artifact Registry
uses: docker/login-action@v1
with:
registry: us-west2-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Get tag
id: get-tag
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
- id: docker-push-tagged
name: Tag Docker image and push to Google Artifact Registry
uses: docker/build-push-action@v2
with:
push: true
tags: |
us-east1-docker.pkg.dev/pv-labs/weather-app:v1