-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (58 loc) · 1.69 KB
/
dev-api.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Build and Deploy to dev env.
# Trigger with tag dev
# Connected with repo environment 'dev'
name: OpenShift Build and Deploy to api
on:
workflow_dispatch:
env:
CLUSTER: https://api.silver.devops.gov.bc.ca:6443
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN_OCP4 }}
BUILD_REF: ${{ github.base_ref }}
ENV_PREFIX: dev
NAMESPACE_DEV: ${{ vars.NAMESPACE_DEV }}
SOAM_CLIENT_ID_DEV: ${{ vars.SOAM_CLIENT_ID_DEV }}
SOAM_CLIENT_SECRET_DEV: ${{ secrets.SOAM_CLIENT_SECRET_DEV }}
PUBLIC_HOST: dev.independentschoolservices.gov.bc.ca
jobs:
api:
name: OpenShift Build & Deploy
runs-on: ubuntu-latest
concurrency: ci-build-api
timeout-minutes: 20
environment:
name: dev
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check changes on backend code
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- 'backend/**'
base: ${{ github.ref}}
- name: Build changes
if: steps.changes.outputs.src == 'true'
working-directory: './tools'
run: |
oc login --token="$AUTH_TOKEN" --server="$CLUSTER"
make print-status
make build-api
make promote-api
- name: Check changes on dir
uses: dorny/paths-filter@v2
id: changes_tools
with:
filters: |
src:
- 'backend/**'
- 'tools/**'
base: ${{ github.ref}}
- name: Deploy changes
if: steps.changes_tools.outputs.src == 'true'
working-directory: './tools'
run: |
oc login --token="$AUTH_TOKEN" --server="$CLUSTER"
make print-status
make deploy-api