name: Generate strategy matrix on: workflow_call: inputs: os: description: 'The operating system to use for the build ("linux", "macos", "windows", or empty for all).' required: false type: string outputs: matrix: description: "The generated strategy matrix." value: ${{ jobs.generate-matrix.outputs.matrix }} defaults: run: shell: bash jobs: generate-matrix: runs-on: ubuntu-latest outputs: matrix: ${{ steps.generate.outputs.matrix }} steps: - name: Checkout repository uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.13" - name: Generate strategy matrix working-directory: .github/scripts/strategy-matrix id: generate env: GENERATE_CONFIG: ${{ inputs.os != '' && format('--config={0}', inputs.os) || '' }} run: ./generate.py ${GENERATE_CONFIG} >>"${GITHUB_OUTPUT}"