dynamic matrix

A matrix whose values are computed by an earlier job and read in with fromJSON, instead of written into the file.

In more detail

An earlier job computes the values, publishes them as a job output, and the next job expands over them. The same generator can return a short list on pull requests and the full list on the default branch to save runner minutes.

Example

list=$(jq -Rsc 'split("\n") - [""]' versions.txt)
echo "list=$list" >> "$GITHUB_OUTPUT"

Related terms

Taught in

References