Skip to content

fix(ci): get promote tag from deployer (#2237) #547

fix(ci): get promote tag from deployer (#2237)

fix(ci): get promote tag from deployer (#2237) #547

Workflow file for this run

name: Merge
on:
push:
branches: [main]
paths-ignore:
- '*.md'
- '.github/**'
- '.github/graphics/**'
- '!.github/workflows/**'
workflow_dispatch:
inputs:
tag:
description: "Image tag set to deploy; e.g. PR number or prod"
type: string
default: 'prod'
concurrency:
# Do not interrupt previous workflows
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
# https://github.com/bcgov/quickstart-openshift-helpers
deploy-test:
name: Deploy (TEST)
uses: ./.github/workflows/.deployer.yml
secrets: inherit
with:
environment: test
db_user: app
tag: ${{ inputs.tag }}
tests:
name: Tests
needs: [deploy-test]
uses: ./.github/workflows/.tests.yml
with:
target: test
deploy-prod:
name: Deploy (PROD)
needs: [tests]
uses: ./.github/workflows/.deployer.yml
secrets: inherit
with:
environment: prod
db_user: app
params:
--set backend.deploymentStrategy=RollingUpdate
--set frontend.deploymentStrategy=RollingUpdate
--set global.autoscaling=true
--set frontend.pdb.enabled=true
--set backend.pdb.enabled=true
tag: ${{ inputs.tag }}
promote:
name: Promote Images
needs: [deploy-prod]
runs-on: ubuntu-24.04
permissions:
packages: write
strategy:
matrix:
package: [migrations, backend, frontend]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ needs.deploy-prod.outputs.tag }}
tags: prod