-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (69 loc) · 2.31 KB
/
integration.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
75
76
77
78
name: Deploy to MoJ Cloud Platform
on:
workflow_dispatch:
push:
branches:
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
image:
name: "Image"
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/build.yml
secrets: inherit
get_ip_ranges:
name: "IP Ranges"
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/ip-ranges-configure.yml
secrets: inherit
modsec_config:
name: "Modsec"
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/modsec-config.yml
secrets: inherit
deploy_dev:
name: "Development"
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/deploy.yml
needs: [image, get_ip_ranges, modsec_config]
with:
environment: development
registry: ${{ needs.image.outputs.registry }}
ips_formatted: ${{ needs.get_ip_ranges.outputs.ips_formatted }}
modsec_config: ${{ needs.modsec_config.outputs.development }}
secrets: inherit
deploy_staging:
name: "Staging"
needs: [image, deploy_dev, get_ip_ranges, modsec_config]
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/deploy.yml
with:
environment: staging
registry: ${{ needs.image.outputs.registry }}
ips_formatted: ${{ needs.get_ip_ranges.outputs.ips_formatted }}
modsec_config: ${{ needs.modsec_config.outputs.staging }}
secrets: inherit
deploy_demo:
name: "Demo"
needs: [image, deploy_dev, get_ip_ranges, modsec_config]
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/deploy.yml
with:
environment: demo
registry: ${{ needs.image.outputs.registry }}
ips_formatted: ${{ needs.get_ip_ranges.outputs.ips_formatted }}
modsec_config: ${{ needs.modsec_config.outputs.demo }}
secrets: inherit
deploy_production:
name: "Production"
needs: [image, deploy_staging, get_ip_ranges, modsec_config]
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/deploy.yml
with:
environment: production
registry: ${{ needs.image.outputs.registry }}
ips_formatted: ${{ needs.get_ip_ranges.outputs.ips_formatted }}
modsec_config: ${{ needs.modsec_config.outputs.production }}
secrets: inherit