From 297b323296151a652d1090326660ea9907455aa3 Mon Sep 17 00:00:00 2001 From: Julien Poissonnier Date: Mon, 29 Jan 2024 10:55:50 +0100 Subject: [PATCH] m --- .github/workflows/pr.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 48e289da..7bf52bce 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,15 +14,23 @@ env: PULUMI_TEST_OWNER: "moolumi" jobs: + setup_matrix: + runs-on: ubuntu-latest + outputs: + matrix-platforms: ${{ steps.set-platforms.outputs.platforms }} + steps: + # - name: Check out code into the Go module directory + # uses: actions/checkout@v2 + - id: set-platforms + run: | + platforms=${{ contains(github.event.pull_request.labels.*.name, 'ci/test') && 'macos-latest windows-latest' || 'ubuntu-latest' }} + echo "platforms=${platforms}" >> $GITHUB_OUTPUT + build: + needs: setup_matrix strategy: matrix: - os: >- # No newlines or trailing newline. - ${{ - contains(github.event.pull_request.labels.*.name, 'ci/test') - && 'macos-latest windows-latest' - || 'ubuntu-latest' - }} + os: ${{fromJson(needs.setup_matrix.outputs.matrix-platforms)}} dotnet-version: [6.0.x, 8.0.x] runs-on: ubuntu-latest