Skip to content

Deploy UAT Environment #111

Deploy UAT Environment

Deploy UAT Environment #111

Workflow file for this run

name: Deploy UAT Environment
on: workflow_dispatch
jobs:
deploy-emerald:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Checkout ArgoCD Repo
id: gitops
uses: actions/checkout@v4
with:
repository: bcgov-c/tenant-gitops-b0471a
ref: uat
token: ${{ secrets.GITOPS }} # `GITOPS` is a secret that contains your PAT
- name: Update Helm Values and Commit
id: helm
run: |
pwd
# Get current date and time
datetime=$(date +'%Y-%m-%d %H:%M:%S')
vtag=${{ github.ref_name }}
echo "Image Tag:"
echo ${vtag//v}
# set image tag
sed -i "s/tag: .*/tag: ${vtag//v} # Image Updated on $datetime/" deploy/uat_values.yaml
# Commit and push the changes
git config --global user.email "ychung-mot@github.com"
git config --global user.name "Young-Jin Chung"
git add deploy/uat_values.yaml
pwd
# Repackage Helm Chart
cd charts/gitops/charts
helm package ../../frontend/
helm package ../../backend/
helm package ../../hangfire/
git add .
git commit -m "Update image tag to ${vtag//v} on $datetime"
git push origin uat