Skip to content

2026.07.3

2026.07.3 #30

name: Build and Deploy to DR
on:
release:
types:
- released
workflow_dispatch:
inputs:
target-ref:
description: The tag to use
required: true
type: string
concurrency:
cancel-in-progress: false
group: api-build-deploy-dr
permissions:
id-token: write
contents: read
issues: write
jobs:
ref:
name: Get target ref
runs-on: ubuntu-latest
outputs:
target-ref: ${{ steps.ref.outputs.ref }}
steps:
- id: ref
name: Select Ref
run: |
TARGET_REF="${{ github.event.inputs.target-ref }}"
# Use shell parameter expansion to provide a default value if input is unset or empty
# github.ref_name will be used if the input is not provided or empty
# Remove "refs/heads/" or "refs/tags/" if present in github.ref_name
TARGET_REF=${TARGET_REF:-$(echo "${{ github.event.release.tag_name }}" | sed 's/refs\/heads\///g' | sed 's/refs\/tags\///g')}
echo "Target reference: $TARGET_REF"
echo "ref=$TARGET_REF" >> $GITHUB_OUTPUT
build:
name: Build
needs: ref
secrets: inherit
uses: ./.github/workflows/_build.yaml
with:
env-name: prod-dr-us-west-2
tag-name: ${{ needs.ref.outputs.target-ref }}
git-ref: ${{ needs.ref.outputs.target-ref }}
migrations:
name: Run Migrations in Prod-DR
needs: [build, ref]
secrets:
slack-webhook: ${{ secrets.SLACK_WEBHOOK_DEPLOY_TO_DR }}
uses: ./.github/workflows/_migrations.yaml
with:
env-name: prod-dr-us-west-2
image-tag: ${{ needs.ref.outputs.target-ref }}
deploy-prod:
name: Deploy to Prod-DR
needs: [ build, migrations, ref ]
secrets:
slack-webhook: ${{ secrets.SLACK_WEBHOOK_DEPLOY_TO_DR }}
uses: ./.github/workflows/_deploy.yaml
with:
env-name: prod-dr-us-west-2
image-tag: ${{ needs.ref.outputs.target-ref }}