-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (82 loc) · 2.29 KB
/
Copy pathpush.yaml
File metadata and controls
88 lines (82 loc) · 2.29 KB
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
name: Push
on:
push:
branches:
- master
tags:
- v*.*.*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build & Push
uses: ./.github/workflows/builder.yaml
permissions:
contents: read
packages: write
with:
context: .
image_name: ${{ vars.APP_NAME }}
github_username: ${{ github.repository_owner }}
secrets:
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
deploy-dev:
name: Deploy to Dev
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: ./.github/workflows/deployer.yaml
permissions:
contents: read
with:
app_name: ${{ vars.APP_NAME }}
acronym: ${{ vars.ACRONYM }}
environment: dev
image_tag: ${{ needs.build.outputs.image_tag }}
job_name: master
namespace_prefix: ${{ vars.NAMESPACE_PREFIX }}
namespace_environment: dev
secrets:
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
deploy-test:
name: Deploy to Test
needs:
- build
- deploy-dev
uses: ./.github/workflows/deployer.yaml
permissions:
contents: read
with:
app_name: ${{ vars.APP_NAME }}
acronym: ${{ vars.ACRONYM }}
environment: test
image_tag: ${{ needs.build.outputs.image_tag }}
job_name: master
namespace_prefix: ${{ vars.NAMESPACE_PREFIX }}
namespace_environment: test
secrets:
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
deploy-prod:
name: Deploy to Prod
needs:
- build
- deploy-dev
- deploy-test
uses: ./.github/workflows/deployer.yaml
permissions:
contents: read
with:
app_name: ${{ vars.APP_NAME }}
acronym: ${{ vars.ACRONYM }}
environment: prod
image_tag: ${{ needs.build.outputs.image_tag }}
job_name: master
namespace_prefix: ${{ vars.NAMESPACE_PREFIX }}
namespace_environment: prod
secrets:
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}