File tree 1 file changed +18
-6
lines changed
1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change 10
10
- ' !.github/workflows/**'
11
11
workflow_dispatch :
12
12
inputs :
13
- pr_no :
14
- description : " PR-numbered container set to deploy"
15
- type : number
16
- required : true
13
+ tag :
14
+ description : " Tag set to deploy; e.g. PR number, latest or prod (default) "
15
+ type : string
16
+ default : ' prod '
17
17
18
18
concurrency :
19
19
# Do not interrupt previous workflows
@@ -24,15 +24,25 @@ jobs:
24
24
vars :
25
25
name : Set Variables
26
26
outputs :
27
- pr : ${{ steps.pr .outputs.pr }}
27
+ tag : ${{ steps.tag .outputs.tag }}
28
28
runs-on : ubuntu-24.04
29
29
timeout-minutes : 1
30
30
steps :
31
31
# Get PR number for squash merges to main
32
32
- name : PR Number
33
+ if : ${{ ! inputs.tag }}
33
34
id : pr
34
35
35
36
37
+ - name : Set Tag
38
+ id : tag
39
+ run : |
40
+ if [ -z "${{ inputs.pr_no }}" ]; then
41
+ echo "tag=${{ steps.pr.outputs.pr }}" >> $GITHUB_ENV
42
+ else
43
+ echo "tag=${{ inputs.tag }}" >> $GITHUB_ENV
44
+ fi
45
+
36
46
# https://github.com/bcgov/quickstart-openshift-helpers
37
47
deploy-test :
38
48
name : Deploy (test)
43
53
with :
44
54
environment : test
45
55
db_user : app
56
+ tag : ${{ needs.var.outputs.tag }}
46
57
47
58
deploy-prod :
48
59
name : Deploy (prod)
60
71
--set global.autoscaling=true
61
72
--set frontend.pdb.enabled=true
62
73
--set backend.pdb.enabled=true
74
+ tag : ${{ needs.var.outputs.tag }}
63
75
64
76
promote :
65
77
name : Promote Images
76
88
with :
77
89
registry : ghcr.io
78
90
repository : ${{ github.repository }}/${{ matrix.package }}
79
- target : ${{ needs.vars .outputs.pr }}
91
+ target : ${{ needs.var .outputs.tag }}
80
92
tags : prod
You can’t perform that action at this time.
0 commit comments