-
Notifications
You must be signed in to change notification settings - Fork 74
59 lines (52 loc) · 2 KB
/
on_push_main.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build, Update Config, and Deploy Development
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: "Build VC-AuthN"
if: github.repository_owner == 'bcgov'
uses: ./.github/workflows/publish.yml
with:
tag: "dev"
ref: "main"
platforms: "linux/amd64"
# Build vc-authn
deploy_dev:
name: Deploy VC-AuthN to Dev
environment: dev
runs-on: ubuntu-latest
needs:
- build
if: ${{ contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) && (github.repository_owner == 'bcgov') }}
steps:
- uses: actions/checkout@v4
- name: Checkout services directory from the trust-over-ip-configurations repo
uses: actions/checkout@v4
with:
repository: bcgov/trust-over-ip-configurations
ssh-key: ${{ secrets.DITP_CONFIGS_REPO_SECRET }}
sparse-checkout: |
services
path: trust-over-ip-configurations
- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"
- name: Authenticate and set context
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
namespace: ${{ secrets.OPENSHIFT_NAMESPACE }}
- name: Deploy VC-Authn-OIDC to Development
run: |
cp trust-over-ip-configurations/services/vc-authn-oidc/charts/dev/values.yaml ./dev-values.yaml
yq e -i 'del(.vc-authn-oidc) | . *= load("trust-over-ip-configurations/services/vc-authn-oidc/charts/dev/values.yaml").vc-authn-oidc' ./dev-values.yaml
helm upgrade --install vc-authn-oidc -f ./dev-values.yaml --set image.tag=${{ needs.build.outputs.image_version }} ./charts/vc-authn-oidc --wait
- name: Restart Deployments
run: |
oc rollout restart deployment/vc-authn-oidc-agent
oc rollout restart deployment/vc-authn-oidc