From 7bc38ccd238d9adb7a72c955724d68e2739f985b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 8 Nov 2024 18:52:59 +0100 Subject: [PATCH] chore: pass platforms in the parent workflow --- .github/workflows/ci-test-go.yml | 7 ++++++- .github/workflows/ci.yml | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-test-go.yml b/.github/workflows/ci-test-go.yml index f68b9587e3..c7cdfc56a9 100644 --- a/.github/workflows/ci-test-go.yml +++ b/.github/workflows/ci-test-go.yml @@ -13,6 +13,11 @@ on: type: boolean default: true description: "Fail the workflow if any of the jobs fail." + platforms: + required: true + type: string + default: "ubuntu-latest" + description: "The platforms in which the project will be run" project-directory: required: true type: string @@ -45,7 +50,7 @@ jobs: RYUK_RECONNECTION_TIMEOUT: "${{ inputs.project-directory == 'modules/compose' && '30s' || '10s' }}" strategy: matrix: - platform: ${{ inputs.project-directory == 'modulegen' && fromJSON(ubuntu-latest, macos-latest, windows-latest) || 'ubuntu-latest' }} + platform: ${{ fromJSON(inputs.platforms) }} runs-on: ${{ matrix.platform }} steps: - name: Setup rootless Docker diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed8082322c..6f4c54a5ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,7 @@ jobs: with: go-version: ${{ matrix.go-version }} fail-fast: true + platforms: ${{ matrix.module == 'modulegen' && '["ubuntu-latest", "macos-latest", "windows-latest"]' || '["ubuntu-latest"]' }} project-directory: "${{ matrix.module }}" rootless-docker: false ryuk-disabled: false @@ -78,6 +79,7 @@ jobs: with: go-version: ${{ matrix.go-version }} fail-fast: false + platforms: 'ubuntu-latest' project-directory: "." rootless-docker: false ryuk-disabled: true @@ -98,6 +100,7 @@ jobs: with: go-version: ${{ matrix.go-version }} fail-fast: false + platforms: 'ubuntu-latest' project-directory: "." rootless-docker: true ryuk-disabled: false