Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/learn-github-actions/contexts#matrix-context
https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
What part(s) of the article would you like to see updated?
The contents of the matrix
context is described as string-valued. But it's not clear if this is always correct. It's also not clear what is legal to provide for a matrix in the first place.
Additional information
e.g. In the example here https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy , version
is syntactically a number. It's not clear whether one should expect ${{ matrix.version }}
to be coerced to a string.
e.g. If I provide an object value to matrix, it's not clear if it should work. The below code seems to set ${{ matrix.foo }}
to the object {"key": true}
, but the GitHub's workflow editor complains "Matrix options must only contain primitive values":
jobs:
example_matrix:
strategy:
matrix:
- foo:
- key: true