-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (48 loc) · 1.12 KB
/
cicd.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
name: CICD (Staging, Prod)
on:
push:
branches:
- main
paths-ignore:
- .gitignore
- README.md
- README_DOCKER.md
- CONTRIBUTING.md
workflow_dispatch:
defaults:
run:
shell: pwsh
jobs:
test-build:
uses: ./.github/workflows/template-test-build.yml
secrets: inherit
staging-approval-gate:
needs: test-build
environment: Staging
runs-on: ubuntu-latest
steps:
- name: approved
env:
ENV_NAME: Staging
run: write-host "Approve for $($env.ENV_NAME)"
staging-deploy:
needs: staging-approval-gate
uses: ./.github/workflows/template-deploy-environment.yml
with:
environment: Staging
secrets: inherit
prod-approval-gate:
needs: staging-deploy
environment: Production
runs-on: ubuntu-latest
steps:
- name: approved
env:
ENV_NAME: Production
run: write-host "Approve for $($env.ENV_NAME)"
prod-deploy:
needs: prod-approval-gate
uses: ./.github/workflows/template-deploy-environment.yml
with:
environment: Production
secrets: inherit