-
Notifications
You must be signed in to change notification settings - Fork 6
113 lines (102 loc) · 3.21 KB
/
sub-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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: ❖ CD
on:
workflow_call:
inputs:
deploy-infra:
description: "Deploy infrastructure"
type: boolean
default: true
deploy-app:
description: "Deploy app"
type: boolean
default: true
deploy-prod:
description: "Deploy to production after successful deployment to staging"
type: boolean
default: false
version:
description: "The release version"
type: string
required: true
concurrency: cd
permissions:
contents: write
checks: write
id-token: write
jobs:
cd-staging:
name: Staging
secrets: inherit
uses: WalletConnect/ci_workflows/.github/workflows/[email protected]
with:
deploy-infra: ${{ inputs.deploy-infra }}
deploy-app: ${{ inputs.deploy-app }}
version: ${{ inputs.version }}
stage: staging
stage-url: https://staging.${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
tf-variables: |
ofac-blocked-zones: ${{ vars.OFAC_BLOCKED_ZONES }}
aws-role-arn: ${{ vars.AWS_ROLE_STAGING }}
validate-staging-health:
name: Validate Staging Health
needs: [ cd-staging ]
uses: ./.github/workflows/sub-validate-health.yml
secrets: inherit
with:
stage: staging
stage-url: https://staging.${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
validate-staging-rust:
name: Validate Staging Rust
needs: [ cd-staging ]
uses: ./.github/workflows/sub-validate-rust.yml
secrets: inherit
with:
stage: staging
stage-url: https://staging.${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
# validate-staging-swift:
# name: Validate Staging Swift
# needs: [ cd-staging ]
# uses: ./.github/workflows/sub-validate-swift.yml
# secrets: inherit
# with:
# stage: staging
# stage-url: https://staging.${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
cd-prod:
name: Prod
needs: [ validate-staging-health, validate-staging-rust ]
if: ${{ inputs.deploy-prod }}
secrets: inherit
uses: WalletConnect/ci_workflows/.github/workflows/[email protected]
with:
deploy-infra: ${{ inputs.deploy-infra }}
deploy-app: ${{ inputs.deploy-app }}
version: ${{ inputs.version }}
stage: prod
stage-url: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
tf-variables: |
ofac-blocked-zones: ${{ vars.OFAC_BLOCKED_ZONES }}
aws-role-arn: ${{ vars.AWS_ROLE_PROD }}
validate-prod-health:
name: Validate Prod Health
needs: [ cd-prod ]
uses: ./.github/workflows/sub-validate-health.yml
secrets: inherit
with:
stage: prod
stage-url: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
validate-prod-rust:
name: Validate Prod Rust
needs: [ cd-prod ]
uses: ./.github/workflows/sub-validate-rust.yml
secrets: inherit
with:
stage: prod
stage-url: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
# validate-prod-swift:
# name: Validate Prod Swift
# needs: [ cd-prod ]
# uses: ./.github/workflows/sub-validate-swift.yml
# secrets: inherit
# with:
# stage: prod
# stage-url: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health