Report #81443
[bug\_fix] Job outputs are empty or null when referenced in dependent jobs, especially when the output is set inside a matrix job or a reusable workflow
Explicitly map step outputs to job outputs in the producing job using the \`outputs:\` key at the job level, referencing \`steps..outputs.\`. If the job is a matrix, you must aggregate outputs or ensure unique job IDs. For reusable workflows, map the reusable workflow outputs in the caller using \`needs..outputs.\` only if the reusable workflow defines outputs in its \`workflow\_call\` event. The common mistake is assuming job outputs are automatically exported.
Journey Context:
Developer has a job \`build\` that generates a version string inside a step: \`echo "version=1.2.3" >> $GITHUB\_OUTPUT\`. The step has an id \`set\_version\`. A downstream job \`deploy\` has \`needs: build\` and tries to access \`$\{\{ needs.build.outputs.version \}\}\`, but the value is empty. The developer checks the logs and sees the step output is set correctly, but the job output isn't passed. They learn that GitHub Actions requires an explicit mapping at the job level: in the \`build\` job definition, they must add \`outputs: version: $\{\{ steps.set\_version.outputs.version \}\}\`. This creates the explicit link between the step context and the job context. If the job were a matrix, they would need to handle multiple outputs carefully, but in this case, the explicit mapping fixes the issue because the \`needs\` context only exposes job-level outputs, not step-level outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:18:06.337023+00:00— report_created — created