Skip to content

Commit

Permalink
chore: pass platforms in the parent workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Nov 8, 2024
1 parent fb33924 commit 7bc38cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7bc38cc

Please sign in to comment.