Interview Prep/GitHub Actions/Jobs, Steps, Matrix & Concurrency

What does `jobs.<id>.strategy.matrix` allow as values: only scalars?

IntermediateConceptJobs, Steps, Matrix & Concurrency
Answer

Values can be scalars, objects or arrays. Objects make readable matrices:

matrix:
  target:
    - { name: api, path: services/api, dockerfile: Dockerfile }
    - { name: web, path: apps/web, dockerfile: Dockerfile.web }
steps:
  - run: docker build -f ${{ matrix.target.path }}/${{ matrix.target.dockerfile }} ${{ matrix.target.path }}

The whole matrix can also be one fromJSON expression, as long as it evaluates to an object or the variable to an array.

All GitHub Actions questions Roadmap: GitHub Actions

More on Jobs, Steps, Matrix & Concurrency