forked from bcgov/common-hosted-form-service
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (108 loc) · 3.25 KB
/
on_push.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Push
env:
ACRONYM: chefs
on:
push:
branches:
- master
tags:
- v*.*.*
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build & Push
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build & Push
uses: ./.github/actions/build-push-container
with:
context: .
image_name: ${{ vars.APP_NAME }}
github_username: ${{ github.repository_owner }}
github_token: ${{ secrets.GITHUB_TOKEN }}
app_contact: ${{ secrets.VITE_CONTACT }}
deploy-dev:
name: Deploy to Dev
environment:
name: dev
url: https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/app
runs-on: ubuntu-latest
needs: build
timeout-minutes: 12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Deploy to Dev
uses: ./.github/actions/deploy-to-environment
with:
app_name: ${{ vars.APP_NAME }}
acronym: ${{ env.ACRONYM }}
environment: dev
job_name: master
namespace_prefix: ${{ vars.NAMESPACE_PREFIX }}
namespace_environment: dev
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
server_host: ${{ vars.SERVER_HOST }}
route_path: /app
route_prefix: ${{ vars.ROUTE_PREFIX }}
deploy-test:
name: Deploy to Test
environment:
name: test
url: https://${{ env.ACRONYM }}-test.apps.silver.devops.gov.bc.ca/app
runs-on: ubuntu-latest
needs:
- build
- deploy-dev
timeout-minutes: 12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Deploy to Test
uses: ./.github/actions/deploy-to-environment
with:
app_name: ${{ vars.APP_NAME }}
acronym: ${{ env.ACRONYM }}
environment: test
job_name: master
namespace_prefix: ${{ vars.NAMESPACE_PREFIX }}
namespace_environment: test
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
server_host: ${{ vars.SERVER_HOST }}
route_path: /app
route_prefix: ${{ vars.ROUTE_PREFIX }}
deploy-prod:
name: Deploy to Prod
environment:
name: prod
url: https://${{ env.ACRONYM }}.apps.silver.devops.gov.bc.ca/app
runs-on: ubuntu-latest
needs:
- build
- deploy-dev
- deploy-test
timeout-minutes: 12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Deploy to Prod
uses: ./.github/actions/deploy-to-environment
with:
app_name: ${{ vars.APP_NAME }}
acronym: ${{ env.ACRONYM }}
environment: prod
job_name: master
namespace_prefix: ${{ vars.NAMESPACE_PREFIX }}
namespace_environment: prod
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
server_host: ${{ vars.SERVER_HOST }}
route_path: /app
route_prefix: ${{ vars.ROUTE_PREFIX }}