-
Notifications
You must be signed in to change notification settings - Fork 19
37 lines (33 loc) · 1.2 KB
/
diff.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: "Plan"
on: [pull_request_target]
concurrency: ${{ github.workflow }}-${{ github.head_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
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- id: set-matrix
run: |
stack=$(jq -rcM ".stacks | { stack: keys }" sharded-stacks.json)
echo "matrix=$stack" >> $GITHUB_OUTPUT
diff:
uses: ./.github/workflows/diff-cdktf-stacks.yml
needs: build-shard-matrix
with:
stacks: ${{ needs.build-shard-matrix.outputs.matrix }}
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit
diff_constructs:
uses: ./.github/workflows/diff-cdktf-stacks.yml
with:
stacks: '{"stack":["custom-constructs"]}'
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit