Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 765 Bytes

File metadata and controls

17 lines (16 loc) · 765 Bytes
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 matrix context with syntax likematrix.version and matrix.os
  • by using the matrix.property syntax to access all values as a single object
  • by using the context keyword within the job configuration to look up values
  • by accessing the variables directly with the syntax version and os in expressions