GitHub Actions Matrix Builder
Build GitHub Actions strategy matrix YAML for OS runners, language versions, include rules, exclude rules, fail-fast, and max-parallel settings directly in your browser.
Matrix Axes
Add each matrix axis as a name and comma-separated values.
Include Rules
Add extra matrix combinations or add fields to a specific combination.
No rules added.
Exclude Rules
Remove specific matrix combinations from the final result.
No rules added.
Output Options
Matrix notes
No matrix axes
Add at least one axis such as os, node-version, or python-version.
Matrix Output
strategy:
fail-fast: true
matrix:
# Add at least one matrix axisBuilding GitHub Actions Matrix YAML
GitHub Actions matrix jobs are useful when you need to test the same workflow across multiple operating systems, language versions, or package managers. But writing the matrix by hand can become messy once include and exclude rules are added.
This GitHub Actions Matrix Builder helps you create a strategy matrix from simple rows. Add axes, values, include rules, exclude rules, fail-fast, and max-parallel settings, then copy clean YAML for your workflow file.
Creating a Matrix for CI Jobs
- Add matrix axes such as os, node-version, or python-version.
- Enter comma-separated values for each axis.
- Add include or exclude rules when certain combinations need changes.
- Choose matrix-only YAML or a full job snippet.
- Copy the output into your GitHub Actions workflow file.
Common GitHub Actions Matrix Builder Use Cases
- Testing a Node project across multiple Node versions.
- Running a workflow across Ubuntu, Windows, and macOS.
- Building Python CI jobs across several Python versions.
- Excluding unsupported operating system and version pairs.
- Adding experimental jobs with include rules.
- Limiting matrix concurrency with max-parallel.
Example Matrix Output
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- windows-latest
node-version:
- 20
- 22Keep Matrix Size Practical
Every axis multiplies the number of jobs. Three operating systems and four language versions already create twelve jobs. Add another axis and the count can grow quickly.
Use exclude rules, max-parallel, or smaller version lists when a matrix becomes too expensive or too slow for normal pull request checks.
Frequently Asked Questions
What is a GitHub Actions matrix?
A matrix lets one job run multiple times with different values, such as operating systems, Node versions, or Python versions.
What does include do in a matrix?
Include adds extra combinations or extra fields to a specific combination in the matrix.
What does exclude do in a matrix?
Exclude removes specific combinations, such as one unsupported OS and language version pair.
Does this validate the full workflow?
No. This tool builds the matrix YAML. Use the GitHub Actions YAML Validator to review the full workflow structure.
Are my matrix values uploaded anywhere?
No. Matrix generation happens directly in your browser, and your values are not uploaded to a server.
