Allow IN_CART status for payment processing (#1346) #483
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Merge | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- '*.md' | |
- '.github/**' | |
- 'common/graphics/**' | |
- '!.github/workflows/deploy.yml' | |
- '!.github/workflows/merge.yml' | |
workflow_dispatch: | |
inputs: | |
pr_no: | |
description: "PR-numbered container set to deploy" | |
type: number | |
required: true | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
vars: | |
name: Set Variables | |
outputs: | |
pr: ${{ steps.pr.outputs.pr }} | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 1 | |
steps: | |
# Get PR number for squash merges to main | |
- name: PR Number | |
id: pr | |
uses: bcgov-nr/[email protected] | |
deploys-test: | |
name: Deploys (test) | |
needs: [vars] | |
uses: ./.github/workflows/deploy.yml | |
secrets: inherit | |
with: | |
autoscaling: false | |
environment: test | |
release: test | |
tag: ${{ needs.vars.outputs.pr }} | |
vault_role: nonprod | |
vault_zone: test | |
promote-images-test: | |
name: Promote Images - Test | |
needs: [deploys-test, vars] | |
runs-on: ubuntu-22.04 | |
permissions: | |
packages: write | |
strategy: | |
matrix: | |
package: [dops, vehicles, frontend, tps-migration] | |
timeout-minutes: 2 | |
steps: | |
- uses: shrink/actions-docker-registry-tag@v4 | |
with: | |
registry: ghcr.io | |
repository: ${{ github.repository }}/${{ matrix.package }} | |
target: ${{ needs.vars.outputs.pr }} | |
tags: test #Promote images AFTER successful deploy | |
deploys-prod: | |
name: Deploys (prod) | |
needs: [promote-images-test, vars] | |
uses: ./.github/workflows/deploy.yml | |
secrets: inherit | |
with: | |
autoscaling: true | |
environment: prod | |
tag: ${{ needs.vars.outputs.pr }} | |
release: prod | |
vault_role: prod | |
vault_zone: prod | |
promote-images-prod: | |
name: Promote Images - Prod | |
needs: [deploys-prod, vars] | |
runs-on: ubuntu-22.04 | |
permissions: | |
packages: write | |
strategy: | |
matrix: | |
package: [dops, vehicles, frontend, tps-migration] | |
timeout-minutes: 2 | |
steps: | |
- uses: shrink/actions-docker-registry-tag@v4 | |
with: | |
registry: ghcr.io | |
repository: ${{ github.repository }}/${{ matrix.package }} | |
target: ${{ needs.vars.outputs.pr }} | |
tags: prod #Promote images AFTER successful deploy | |
create-release: | |
name: Create release | |
runs-on: ubuntu-22.04 | |
needs: [deploys-prod, vars] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Create Release | |
run: | | |
gh release create "${{ needs.vars.outputs.pr }}" \ | |
--repo=${{ github.repository }} \ | |
--title="${{ github.repository }}-${{ needs.vars.outputs.pr }}" \ | |
--generate-notes |