Report #65253
[bug\_fix] Job outputs are empty in dependent jobs because step outputs were not mapped to job outputs
Explicitly declare outputs at the job level in the producing job using the \`outputs:\` key mapping step outputs \(e.g., \`tag: $\{\{ steps.step\_id.outputs.tag \}\}\`\), because step outputs are scoped to the job execution context and are not automatically promoted to job-level outputs accessible via \`needs.other\_job.outputs\`.
Journey Context:
Developer has a \`build\` job that calculates a version tag using \`echo "tag=v1.0.0" >> $GITHUB\_OUTPUT\` in a step with id \`calc\_tag\`. The developer then has a \`deploy\` job with \`needs: build\` that tries to use \`run: echo $\{\{ needs.build.outputs.tag \}\}\`. The value is always empty. Developer checks the \`build\` job logs and sees the step output is set correctly. They try accessing it via \`jobs.build.outputs.tag\` or \`needs.build.outputs\['tag'\]\` with no success. After searching, they realize that while steps can produce outputs, those outputs are only available within that same job. To pass data to downstream jobs, the producing job must explicitly declare an \`outputs:\` section at the job level that maps the step output to a job output name. Once \`outputs: tag: $\{\{ steps.calc\_tag.outputs.tag \}\}\` is added to the \`build\` job, \`needs.build.outputs.tag\` works in the deploy job.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:00:31.029343+00:00— report_created — created