Skip to content

Commit e94a054

Browse files
authored
chore(ci): create and consume test tags (#758)
1 parent 3bafc6a commit e94a054

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed
File renamed without changes.

.github/workflows/merge-main.yml .github/workflows/merge.yml

+18
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,21 @@ jobs:
2828
logout_chain_url: https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://test.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=
2929
target: test
3030
url: fom-test.nrs.gov.bc.ca
31+
32+
images-promote:
33+
name: Promote images (TEST)
34+
continue-on-error: true # If no prod tags
35+
needs: [deploy]
36+
permissions:
37+
packages: write
38+
runs-on: ubuntu-24.04
39+
strategy:
40+
matrix:
41+
component: [api, admin, db, public]
42+
steps:
43+
- uses: shrink/actions-docker-registry-tag@v4
44+
with:
45+
registry: ghcr.io
46+
repository: ${{ github.repository }}/${{ matrix.component }}
47+
target: ${{ needs.deploy.outputs.tag }}
48+
tags: test

.github/workflows/release.yml .github/workflows/prod.yml

+7-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
name: PROD (release)
1+
name: PROD (dispatch)
22

33
on:
4-
release:
5-
types: [published]
64
workflow_dispatch:
75
inputs:
86
tag:
9-
description: Container tag; usually prod or PR number, can be omitted
10-
type: string
11-
workflow_call:
12-
inputs:
13-
tag:
14-
description: Container tag; usually prod or PR number, can be omitted
7+
description: Container tag; usually test, prod or PR number
8+
default: test
9+
required: true
1510
type: string
1611

1712
concurrency:
@@ -55,7 +50,7 @@ jobs:
5550

5651
images-promote:
5752
name: Promote images (PROD)
58-
needs: [deploy, images-backup]
53+
needs: [images-backup]
5954
permissions:
6055
packages: write
6156
runs-on: ubuntu-24.04
@@ -67,7 +62,5 @@ jobs:
6762
with:
6863
registry: ghcr.io
6964
repository: ${{ github.repository }}/${{ matrix.component }}
70-
target: ${{ needs.deploy.outputs.tag }}
71-
tags: |
72-
prod
73-
${{ github.event.release.tag_name }}
65+
target: ${{ inputs.tag }}
66+
tags: prod

0 commit comments

Comments
 (0)