to_github_matrix_json

Function to_github_matrix_json 

Source
pub fn to_github_matrix_json(entries: &[MatrixEntry]) -> Result<String>
Expand description

Serialises the matrix to the JSON shape GitHub Actions expects for a dynamic matrix:

{"include": [{"label": "default", "features": ""}, ...]}

Write this to $GITHUB_OUTPUT as matrix=<json> to consume it with fromJson(needs.<job>.outputs.matrix).

ยงErrors

Returns an error if JSON serialisation fails.