File tree 1 file changed +23
-7
lines changed
1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change 14
14
PULUMI_TEST_OWNER : " moolumi"
15
15
16
16
jobs :
17
+ setup_matrix :
18
+ runs-on : ubuntu-latest
19
+ outputs :
20
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
21
+ steps :
22
+ - id : set-matrix
23
+ run : |
24
+ platforms=${{ contains(github.event.pull_request.labels.*.name, 'ci/test') && 'macos-latest windows-latest' || 'ubuntu-latest' }}
25
+ echo "matrix={\"platforms\": $(echo $platforms | jq -cR 'split(" ")')}"
26
+ echo "matrix={\"platforms\": $(echo $platforms | jq -cR 'split(" ")')}" >> $GITHUB_OUTPUT
27
+
28
+ debug :
29
+ runs-on : ubuntu-latest
30
+ needs : setup_matrix
31
+ steps :
32
+ - name : Debug
33
+ run : echo XX"${{ needs.setup_matrix.outputs.matrix }}"XX
34
+ - name : Debug2
35
+ run : echo XX"${{ fromJson(needs.setup_matrix.outputs.matrix).platforms }}"XX
36
+
17
37
build :
38
+ needs : setup_matrix
18
39
strategy :
19
40
matrix :
20
- os : >- # No newlines or trailing newline.
21
- ${{
22
- contains(github.event.pull_request.labels.*.name, 'ci/test')
23
- && 'macos-latest windows-latest'
24
- || 'ubuntu-latest'
25
- }}
41
+ os : ${{ fromJson(needs.setup_matrix.outputs.matrix).platforms }}
26
42
dotnet-version : [6.0.x, 8.0.x]
27
43
28
- runs-on : ubuntu-latest
44
+ runs-on : ${{ matrix.os }}
29
45
steps :
30
46
- name : Checkout code
31
47
uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments