-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.25 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy to Test
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- name: Export github reference var
run: echo "GITHUB_REFERENCE=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
- name: Checkout Tenant GitOps Repo
uses: actions/checkout@v3
with:
repository: bcgov-c/tenant-gitops-ea352d
path: tenant-gitops
ssh-key: ${{ secrets.SSH_KEY }}
persist-credentials: true
- name: Update Argo CD
uses: mikefarah/[email protected]
with:
cmd: |
yq -i '.drupal.tag = strenv(GITHUB_REFERENCE) |
.nginx.tag = strenv(GITHUB_REFERENCE) ' tenant-gitops/helm-drupal/charts/drupal/values-mfin-data-catalogue-test.yaml
- name: Commit files
run: |
cd tenant-gitops
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "feat(helm): Update container images to ${{ env.GITHUB_REFERENCE }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
ssh: true
branch: main
directory: tenant-gitops
repository: bcgov-c/tenant-gitops-ea352d