| question | How can you access the current values of variables in a matrix within a job in the example below: |
|---|---|
| documentation | https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy |
jobs:
example_matrix:
strategy:
matrix:
version: [10, 12, 14]
os: [ubuntu-latest, windows-latest]- reference variables through the
matrixcontext with syntax likematrix.versionandmatrix.os - by using the
matrix.propertysyntax to access all values as a single object - by using the
contextkeyword within the job configuration to look up values - by accessing the variables directly with the syntax
versionandosin expressions