-
Notifications
You must be signed in to change notification settings - Fork 19
37 lines (32 loc) · 942 Bytes
/
deploy.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
name: "Deploy"
on:
workflow_dispatch: {}
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build-shard-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- id: set-matrix
run: |
stack=$(jq -rcM ".stacks | { stack: keys }" sharded-stacks.json)
echo "matrix=$stack" >> $GITHUB_OUTPUT
deploy:
uses: ./.github/workflows/deploy-cdktf-stacks.yml
needs: build-shard-matrix
with:
stacks: ${{ needs.build-shard-matrix.outputs.matrix }}
upgrade-repositories: true
secrets: inherit
deploy_constructs:
uses: ./.github/workflows/deploy-cdktf-stacks.yml
with:
stacks: '{"stack":["custom-constructs"]}'
upgrade-repositories: false
secrets: inherit