Skip to content

Commit 4831c7f

Browse files
committed
m
1 parent a4c0dde commit 4831c7f

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/pr.yml

+22-6
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,31 @@ env:
1414
PULUMI_TEST_OWNER: "moolumi"
1515

1616
jobs:
17+
setup_matrix:
18+
runs-on: ubuntu-latest
19+
outputs:
20+
platforms: ${{ steps.set-platforms.outputs.platforms }}
21+
steps:
22+
# - name: Check out code into the Go module directory
23+
# uses: actions/checkout@v2
24+
- id: set-platforms
25+
run: |
26+
platforms=${{ contains(github.event.pull_request.labels.*.name, 'ci/test') && 'macos-latest windows-latest' || 'ubuntu-latest' }}
27+
echo "platforms=${platforms}"
28+
echo "platforms=[${platforms}]" >> $GITHUB_OUTPUT
29+
30+
debug:
31+
runs-on: ubuntu-latest
32+
needs: setup_matrix
33+
steps:
34+
- name: Debug2
35+
run: echo XX"${{ needs.setup_matrix.outputs.platforms }}"XX
36+
1737
build:
38+
needs: setup_matrix
1839
strategy:
1940
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.platforms) }}
2642
dotnet-version: [6.0.x, 8.0.x]
2743

2844
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)