Skip to content

ORV2 1853 Moving TPS Polling Details To Vault (#1087) #320

ORV2 1853 Moving TPS Polling Details To Vault (#1087)

ORV2 1853 Moving TPS Polling Details To Vault (#1087) #320

Workflow file for this run

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:
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@v3
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:
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@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ needs.vars.outputs.pr }}
tags: prod #Promote images AFTER successful deploy