-
Notifications
You must be signed in to change notification settings - Fork 10
102 lines (87 loc) · 2.92 KB
/
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
name: CD
on:
workflow_dispatch:
inputs:
sha:
description: "partner-chains commit SHA to build from"
required: true
type: string
tag:
description: "partner-chains release tag"
required: true
type: string
permissions:
id-token: write
contents: write
env:
AWS_REGION: "eu-central-1"
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
jobs:
build-pc-artifacts:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/modules/artifacts/build-pc-artifacts.yml
with:
sha: ${{ inputs.sha }}
tag: ${{ inputs.tag }}
build-and-publish-ecr-image:
needs: build-pc-artifacts
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/modules/images/build-and-publish-ecr-image.yml
with:
sha: ${{ inputs.sha }}
tag: ${{ inputs.tag }}
partner-chains-smart-contracts:
uses: ./.github/workflows/modules/artifacts/download-pcsc-artifact.yml
with:
sha: ${{ inputs.sha }}
local-environment-tests:
needs: [build-pc-artifacts, partner-chains-smart-contracts]
uses: ./.github/workflows/modules/tests/local-environment-tests.yml
with:
tag: ${{ inputs.tag }}
image: ${{ secrets.ECR_REGISTRY_SECRET }}/substrate-node:${{ inputs.sha }}
chain-specs:
needs: local-environment-tests
uses: ./.github/workflows/modules/artifacts/generate-chain-specs.yml
with:
sha: ${{ inputs.sha }}
create-draft-release:
needs: local-environment-tests
uses: ./.github/workflows/modules/release/create-draft-release.yml
with:
tag: ${{ inputs.tag }}
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-staging-preview:
needs: chain-specs
uses: ./.github/workflows/modules/deploy/staging-preview-deploy.yml
with:
image: ${{ secrets.ECR_REGISTRY_SECRET }}/substrate-node:${{ inputs.sha }}
chain-spec-secret: staging-preview-chain-spec-${{ inputs.sha }}
staging-preview-tests:
needs: deploy-staging-preview
uses: ./.github/workflows/modules/tests/staging-preview-tests.yml
build-and-publish-ghcr-image:
needs: staging-preview-tests
uses: ./.github/workflows/modules/images/build-and-publish-ghcr-image.yml
with:
sha: ${{ inputs.sha }}
tag: ${{ inputs.tag }}
publish-release:
needs: staging-preview-tests
uses: ./.github/workflows/modules/release/publish-release.yml
with:
tag: ${{ inputs.tag }}
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-staging-preprod:
needs: staging-preview-tests
uses: ./.github/workflows/modules/deploy/staging-preprod-deploy.yml
with:
image: ${{ secrets.ECR_REGISTRY_SECRET }}/substrate-node:${{ inputs.sha }}
chain-spec-secret: staging-preprod-chain-spec-${{ inputs.sha }}
staging-preprod-tests:
needs: deploy-staging-preprod
uses: ./.github/workflows/modules/tests/staging-preprod-tests.yml