Skip to content

Build(deps): Bump fast-loops from 1.1.3 to 1.1.4 #41

Build(deps): Bump fast-loops from 1.1.3 to 1.1.4

Build(deps): Bump fast-loops from 1.1.3 to 1.1.4 #41

name: build and push backstage image to artifact registry
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
APP: backstage
GAR_LOCATION: us
GAR_REPOSITORY: rapid-release-model-prod
GCP_PROJECT_ID: moz-fx-rapid-release-mode-1cb6
jobs:
build_backstage_image:
name: Build backstage container image
runs-on: ubuntu-latest
environment: build
permissions:
contents: read
id-token: write
steps:
- id: checkout-application-repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- id: gcp-auth
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: ${{ secrets.WORKLOAD_IDENTITY_POOL_PROJECT_NUMBER }}
- uses: docker/login-action@v2
name: Docker login
with:
registry: ${{ env.GAR_LOCATION }}-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.gcp-auth.outputs.access_token }}
- id: build-and-push-backstage
uses: docker/build-push-action@v3
with:
context: . # Expecting the multi-stage build from here: https://backstage.io/docs/deployment/docker/#multi-stage-build
tags: |
${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GAR_REPOSITORY }}/moz-backstage-app:${{ github.sha }}
${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GAR_REPOSITORY }}/moz-backstage-app:latest
push: true
cache-from: type=gha
cache-to: type=gha,mode=max