Outputs that cross runner boundaries
Step outputs only flow within a job. To pass values between jobs (which run on separate runners), declare job outputs. The pattern:
- A step inside the producer job writes to
$GITHUB_OUTPUT. - The producer job's
outputs:map exposes the step output as a job output. - Consumer jobs declare
needs:the producer. - Consumer reads via
needs.<producer>.outputs.<name>.
Common shape
A setup job that decides what to run, followed by jobs that branch on the decision: 'is this a release or a normal CI?', 'which platforms should we deploy to?'.
Limitations
- Job outputs are strings only. Use JSON if you need structured values: write JSON, read with
fromJSON. - Maximum 1 MB total per job's outputs.