-
Notifications
You must be signed in to change notification settings - Fork 3
/
sub-cd.yml
74 lines (68 loc) · 2.08 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
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
permissions:
contents: read
id-token: write
jobs:
cd-staging:
name: Staging
secrets: inherit
uses: WalletConnect/ci_workflows/.github/workflows/cd.yml@main
with:
deploy-infra: ${{ inputs.deploy-infra }}
deploy-app: ${{ inputs.deploy-app && !inputs.deploy-infra }}
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:
name: Validate Staging
needs: [ cd-staging ]
secrets: inherit
uses: ./.github/workflows/sub-validate.yml
with:
stage: staging
stage-url: https://staging.${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
cd-prod:
name: Prod
needs: [ validate-staging ]
if: ${{ inputs.deploy-prod }}
secrets: inherit
uses: WalletConnect/ci_workflows/.github/workflows/cd.yml@main
with:
deploy-infra: ${{ inputs.deploy-infra }}
deploy-app: ${{ inputs.deploy-app && !inputs.deploy-infra }}
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:
name: Validate Prod
needs: [ cd-prod ]
secrets: inherit
uses: ./.github/workflows/sub-validate.yml
with:
stage: prod
stage-url: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health