Skip to content

Commit bc94afb

Browse files
authored
Merge pull request #518 from bcgov/yj
chore: emeral uat deployment
2 parents 0889901 + fc73c79 commit bc94afb

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

.github/workflows/deploy-uat.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy UAT Environment
33
on: workflow_dispatch
44

55
jobs:
6-
deploy:
6+
deploy-silver:
77
runs-on: ubuntu-22.04
88
timeout-minutes: 5
99
permissions:
@@ -41,3 +41,49 @@ jobs:
4141
IMAGE_TAG_BACKEND=${vtag//v} \
4242
IMAGE_TAG_HANGFIRE=${vtag//v} \
4343
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

0 commit comments

Comments
 (0)