A job exposes outputs that later jobs read through the needs context
Answer: Define job outputs with the jobs.<job_id>.outputs syntax, mapping each name to a step output. Use the jobs.<job_id>.needs syntax to make this job dependent on the original job. Access the outputs in the dependent job with the needs.<job_id>.outputs.<output_name> syntax.
Writing a step output
A step writes an output by appending name=value to the GITHUB_OUTPUT environment file: echo "{name}={value}" >> "$GITHUB_OUTPUT". The step needs an id so later steps can retrieve the value as steps.<id>.outputs.<name>. The job defines outputs that are mapped to the results of its steps.
See also
- github-actions-workflow-basics
- github-actions-matrix
- github-actions-service-containers
- github-actions-token-permissions
Claims
- id: C1 claim: Define job outputs with the jobs.<job_id>.outputs syntax. source: S1 evidence: "Use the
jobs.<job_id>.outputssyntax"
- id: C2 claim: A dependent job reads outputs as needs.<job_id>.outputs.<output_name>. source: S1 evidence: "needs.<job_id>.outputs.<output_name>"
- id: C3 claim: Write a step output by appending name=value to GITHUB_OUTPUT. source: S2 evidence: "echo \"{name}={value}\" >> \"$GITHUB_OUTPUT\""
- id: C4 claim: The step must have an id before later steps can read its output. source: S2 evidence: "the step will need an
id"
Sources
- [S1] Defining and using job outputs. GitHub Docs. https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/pass-job-outputs . License: CC-BY-4.0. Accessed 2026-11-17.
- [S2] Setting an output parameter (workflow commands). github/docs (GitHub). https://github.com/github/docs/blob/main/content/actions/reference/workflows-and-actions/workflow-commands.md . License: CC-BY-4.0. Accessed 2026-11-17.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Defining and using job outputs, CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.; github/docs (GitHub), Setting an output parameter (workflow commands), CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Defining and using job outputs, CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.; github/docs (GitHub), Setting an output parameter (workflow commands), CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc..
Cite this
iinventedlight. 2026. "A job exposes outputs that later jobs read through the needs context." iinventedlight Library, iil:note:yympt29d, version of 2026-11-17. https://iinventedlight.com/library/notes/github-actions-job-outputs/. License: CC-BY-4.0.
@misc{iil_note_yympt29d,
author = {{iinventedlight}},
title = {{A job exposes outputs that later jobs read through the needs context}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-17},
url = {https://iinventedlight.com/library/notes/github-actions-job-outputs/},
note = {Permanent ID iil:note:yympt29d. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/github-actions-job-outputs.md.