File tree Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Deploy UAT Environment
3
3
on : workflow_dispatch
4
4
5
5
jobs :
6
- deploy :
6
+ deploy-silver :
7
7
runs-on : ubuntu-22.04
8
8
timeout-minutes : 5
9
9
permissions :
41
41
IMAGE_TAG_BACKEND=${vtag//v} \
42
42
IMAGE_TAG_HANGFIRE=${vtag//v} \
43
43
working-directory : ./helm/main
44
+
45
+ deploy-emerald :
46
+ runs-on : ubuntu-22.04
47
+ timeout-minutes : 5
48
+
49
+ steps :
50
+ - name : Checkout ArgoCD Repo
51
+ id : gitops
52
+ uses : actions/checkout@v4
53
+ with :
54
+ repository : bcgov-c/tenant-gitops-b0471a
55
+ ref : uat
56
+ token : ${{ secrets.GITOPS }} # `GITOPS` is a secret that contains your PAT
57
+ - name : Update Helm Values and Commit
58
+ id : helm
59
+ run : |
60
+ pwd
61
+
62
+ # Get current date and time
63
+ datetime=$(date +'%Y-%m-%d %H:%M:%S')
64
+ vtag=${{ github.ref_name }}
65
+
66
+ echo "Image Tag:"
67
+ echo ${vtag//v}
68
+
69
+ # set image tag
70
+ sed -i "s/tag: .*/tag: ${vtag//v} # Image Updated on $datetime/" deploy/uat_values.yaml
71
+
72
+ # Commit and push the changes
73
+ git config --global user.email "ychung-mot@github.com"
74
+ git config --global user.name "Young-Jin Chung"
75
+
76
+ git add deploy/uat_values.yaml
77
+
78
+ pwd
79
+ # Repackage Helm Chart
80
+ cd charts/gitops/charts
81
+
82
+ helm package ../../frontend/
83
+ helm package ../../backend/
84
+ helm package ../../hangfire/
85
+
86
+ git add .
87
+
88
+ git commit -m "Update image tag to ${vtag//v} on $datetime"
89
+ git push origin uat
You can’t perform that action at this time.
0 commit comments