-
Notifications
You must be signed in to change notification settings - Fork 30
64 lines (60 loc) · 2.3 KB
/
cloud-infrastructure.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
name: Cloud Infrastructure - Deployment
on:
push:
branches:
- main
paths:
- "cloud-infrastructure/**"
- ".github/workflows/_deploy-infrastructure.yml"
- ".github/workflows/cloud-infrastructure.yml"
- "!**.md"
pull_request:
paths:
- "cloud-infrastructure/**"
- ".github/workflows/_deploy-infrastructure.yml"
- ".github/workflows/cloud-infrastructure.yml"
- "!**.md"
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
stage:
name: Staging
if: ${{ vars.STAGING_CLUSTER_ENABLED == 'true' }}
uses: ./.github/workflows/_deploy-infrastructure.yml
secrets: inherit
with:
github_environment: "staging"
include_shared_environment_resources: true
unique_prefix: ${{ vars.UNIQUE_PREFIX }}
azure_environment: "stage"
shared_location: ${{ vars.STAGING_SHARED_LOCATION }}
cluster_location: ${{ vars.STAGING_CLUSTER_LOCATION }}
cluster_location_acronym: ${{ vars.STAGING_CLUSTER_LOCATION_ACRONYM }}
sql_admin_object_id: ${{ vars.STAGING_SQL_ADMIN_OBJECT_ID }}
domain_name: ${{ vars.STAGING_DOMAIN_NAME }}
service_principal_id: ${{ vars.STAGING_SERVICE_PRINCIPAL_ID }}
tenant_id: ${{ vars.TENANT_ID }}
subscription_id: ${{ vars.STAGING_SUBSCRIPTION_ID }}
deployment_enabled: ${{ vars.STAGING_CLUSTER_ENABLED }}
prod1:
name: Production
needs: stage
if: ${{ vars.PRODUCTION_CLUSTER1_ENABLED == 'true' && github.ref == 'refs/heads/main' }}
uses: ./.github/workflows/_deploy-infrastructure.yml
secrets: inherit
with:
github_environment: "production"
include_shared_environment_resources: true
unique_prefix: ${{ vars.UNIQUE_PREFIX }}
azure_environment: "prod"
shared_location: ${{ vars.PRODUCTION_SHARED_LOCATION }}
cluster_location: ${{ vars.PRODUCTION_CLUSTER1_LOCATION }}
cluster_location_acronym: ${{ vars.PRODUCTION_CLUSTER1_LOCATION_ACRONYM }}
sql_admin_object_id: ${{ vars.PRODUCTION_SQL_ADMIN_OBJECT_ID }}
domain_name: ${{ vars.PRODUCTION_DOMAIN_NAME }}
service_principal_id: ${{ vars.PRODUCTION_SERVICE_PRINCIPAL_ID }}
tenant_id: ${{ vars.TENANT_ID }}
subscription_id: ${{ vars.PRODUCTION_SUBSCRIPTION_ID }}
deployment_enabled: ${{ vars.PRODUCTION_CLUSTER1_ENABLED }}