Interview Prep/GitHub Actions/Expressions, Outputs, Matrix & Conditions

`Error: Unable to process file command 'output' successfully. Error: Invalid format ' "items": ['`

IntermediateTroubleshootingExpressions, Outputs, Matrix & Conditions
Answer

Likely causes → Multiline value (pretty JSON) written as name=value without the delimiter syntax.

Diagnose → Look at how the step writes the output.

Fix → Compact the JSON (jq -c) or use a delimiter:

echo "matrix=$(jq -c . matrix.json)" >> "$GITHUB_OUTPUT"

Prevent → Always jq -c JSON destined for outputs.

All GitHub Actions questions Roadmap: GitHub Actions

More on Expressions, Outputs, Matrix & Conditions