Skip to content

bcd_release

bcd_release #266

name: Prod Build - Updates
on:
workflow_dispatch:
inputs:
notes:
description: "Notes"
required: false
default: ""
workflow_call:
secrets:
GCP_PROJECT_NAME:
required: true
WIP_PROJECT_ID:
required: true
repository_dispatch:
types: [bcd_release]
jobs:
deploy-prod-updates:
name: Deploy to prod
runs-on: ubuntu-latest
environment: prod
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: updates
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: "https://registry.npmjs.org/"
cache: npm
- run: npm ci
- run: npm run updates rumba
- name: Authenticate with GCP
uses: google-github-actions/auth@v2
with:
token_format: access_token
service_account: deploy-prod-updates@${{ secrets.GCP_PROJECT_NAME }}.iam.gserviceaccount.com
workload_identity_provider: projects/${{ secrets.WIP_PROJECT_ID }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Sync Rumba update
run: |-
gsutil -m -h "Cache-Control:public, max-age=86400" rsync -d -r rumba-updates/ gs://updates-prod-mdn/rumba-bcd-updates
trigger-prod-rumba-update-if-new:
name: Trigger rumba updates if new release.
needs: deploy-prod-updates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- env:
RUMBA_AUTH: ${{ secrets.RUMBA_PROD_API_KEY }}
RUMBA_HOST: https://developer.mozilla.org
UPDATES_HOST: https://updates.developer.mozilla.org
run: . scripts/sync_rumba_updates.sh