-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 1.52 KB
/
ci-cd.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
name: Integration & Delivery
# workflow_call:
on:
push:
branches:
- "develop" # DEV
- "release/**" # QA
- "main" # UAT
jobs:
integration:
name: Integration
uses: dmamulashvili/webapi-msa-template/.github/workflows/integration.yml@main
deploy_to_dev:
name: Deploy DEV
needs: [integration]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
environment:
name: Development
url: https://dev.example.com
steps:
- name: Checkout
uses: actions/checkout@v3
# ...deployment-specific steps
deploy_to_qa:
name: Deploy QA
needs: [integration]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/release/**'
environment:
name: QA
url: https://qa.example.com
steps:
- name: Checkout
uses: actions/checkout@v3
# ...deployment-specific steps
deploy_to_uat:
name: Deploy UAT
needs: [integration]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: UAT
url: https://uat.example.com
steps:
- name: Checkout
uses: actions/checkout@v3
# ...deployment-specific steps
deploy_to_prod:
name: Deploy PROD
needs: [deploy_to_uat]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: PROD # Environment protection rules / Required reviewers
url: https://example.com
steps:
- name: Checkout
uses: actions/checkout@v3
# ...deployment-specific steps