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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Set up Python uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.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) || '' }} GENERATE_EVENT: ${{ github.event_name }} run: ./generate.py ${GENERATE_CONFIG} --event="${GENERATE_EVENT}" >>"${GITHUB_OUTPUT}"