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

A matrix job's output used downstream has a different value on each run.

AdvancedTroubleshootingExpressions, Outputs, Matrix & Conditions
Answer

Likely causes → All matrix legs write the same job output; the last leg to finish wins.

Diagnose → Compare leg finish times with the value.

Fix → Per-leg artifacts (digest-${{ matrix.arch }}) collected by a fan-in job, or separate non-matrix jobs when values must be distinct.

Prevent → Never consume job outputs from matrix jobs as if they were single values.

All GitHub Actions questions Roadmap: GitHub Actions

More on Expressions, Outputs, Matrix & Conditions