I’m new to GitHub Actions so I don’t quite have the Googlefu to solve my problem
Simplifying, I have something like
jobs:
test_run_a:
uses: ./.github/workflows/test.yml
with:
param: "A"
secrets: inherit
in the other file test.yml
I have
name: test
on:
workflow_call:
inputs:
param:
required: true
type: string
jobs:
unit-test:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps: ...
so currently, all jobs that use test.yml
run on ubuntu
and mac
. I would like to make it so that it is the outer job (in this case test_run_a
) that defines the OS matrix.
Basically, I would like to make it so that job test_run_a
runs on both OS, and I can define another test_run_b
that runs only on mac
, with both of them using the shared job code in test.yml
I have tried to move the strategy
out into the outer job, but it does not work. Thank you in advance