Skip to content

that was too short #101

that was too short

that was too short #101

Workflow file for this run

name: Deployment
on:
push:
branches:
- develop
- staging
release:
types:
- published
env:
IMAGE_NAME: git-hg-sync
GAR_LOCATION: us
GCP_PROJECT_ID: moz-fx-git-hg-sync-prod
GAR_REPOSITORY: git-hg-sync-prod
jobs:
deploy:
runs-on: ubuntu-latest
environment: build
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- uses: docker/setup-buildx-action@v2
- id: gcp-auth
name: Google authentication
uses: google-github-actions/auth@v2
with:
token_format: "access_token"
service_account: artifact-writer@${{ env.GCP_PROJECT_ID }}.iam.gserviceaccount.com
workload_identity_provider: ${{ vars.GCPV2_GITHUB_WORKLOAD_IDENTITY_PROVIDER }}
- name: Log in to the container registry
uses: docker/login-action@v2
with:
registry: ${{ env.GAR_LOCATION }}-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.gcp-auth.outputs.access_token }}
- name: Build and push image
uses: docker/build-push-action@v3
with:
context: .
tags: |
${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GAR_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max