GitHub Actions "Matrix vector 'x' does not contain any values"
A matrix dimension expanded to no values - it is null, an empty list, or a fromJSON of an empty/blank string - so the matrix has nothing to iterate and the job cannot be generated.
What this error means
The workflow fails with "Matrix vector 'node' does not contain any values", naming a dimension whose list is empty. Common with dynamic matrices built from a previous job output.
Error: Matrix vector 'node' does not contain any valuesCommon causes
Static dimension is empty or null
A matrix key mapped to [], null, or left blank has no values to expand, which is rejected.
Dynamic matrix produced an empty array
When the matrix comes from fromJSON(needs.x.outputs.list), an upstream job that emitted "[]" or an empty string yields a vector with no values.
How to fix it
Ensure each dimension has values
Give static dimensions a non-empty list, and guard dynamic matrices against an empty array.
strategy:
matrix:
node: [18, 20, 22] # non-empty listHandle empty dynamic matrices
- Have the producing job always emit a valid non-empty JSON array, or skip the matrix job when empty.
- Add an if: on the matrix job that checks the upstream output is not "[]".
- Echo the JSON in the producer to confirm it is a non-empty array before fromJSON.
How to prevent it
- Keep every static matrix dimension a non-empty list.
- Guard dynamic matrices so an empty result skips rather than fails.
- Validate producer output is valid non-empty JSON before fromJSON.