Move results between steps, jobs and reviewers
Choose an output, artifact, cache or job summary to match the consumer and the required lifetime of a result.
A release with two consumers
Build creates a 30 MB archive and a version string. Deploy needs both, while a reviewer needs a one-page test report. Which three delivery mechanisms should build use?
Work through the decision
Upload the archive as an artifact and verify its digest after download. Map the version from a step output to a job output. Append the human-readable report to the job summary. Keep build dependencies in a regenerable cache and match artifact retention to the review window.
Keep evidence and accelerators separate
Use a cache to accelerate repeated dependency installation and an artifact to deliver a named output or report. Retention for artifacts and logs is bounded by repository or organization settings. The Actions REST API can enumerate and delete eligible artifacts or runs according to a retention policy.
Choose a transfer mechanism
Write small named step outputs to GITHUB_OUTPUT, expose them as job outputs, then read them through needs. Map reusable workflow outputs when crossing the call boundary. For files such as bundles, upload an artifact and download it in the consuming job.
In this job fragment, the shell writes a named value, the producer promotes it, and the dependent job reads that specific value. A file would need a separate artifact transfer.
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.meta.outputs.version }}
steps:
- id: meta
run: echo "version=1.4" >> "$GITHUB_OUTPUT"
report:
needs: build
runs-on: ubuntu-latest
steps:
- env:
VERSION: ${{ needs.build.outputs.version }}
run: echo "$VERSION"
Write a readable job summary
Append Markdown to GITHUB_STEP_SUMMARY in a step to show useful results on the run summary page. Include counts, statuses and links to artifacts. The summary is a presentation surface. Keep machine-readable data in an output or artifact.
Expose status and gate deployment
A workflow badge displays status and can target a branch or event. It does not authorize deployment. A deployment job that names a protected environment must satisfy that environment's rules before it receives access to its scoped secrets.
Packaging sees an empty version
The producer writes VERSION=8 to GITHUB_ENV and prints 8 in the next step. A separate job sees no value. Where did the transfer stop?
Check your reasoning
GITHUB_ENV reached later steps of the same job. Write a named output to GITHUB_OUTPUT, expose it as a job output and declare the producer in the consumer's needs. If the producer lives in a callable workflow, expose the workflow output as well.
GitHub documentation · GH-200 skills outline
Continue in GitHub Foundations. Trace a release through Git history.
Move results between steps, jobs and reviewers quiz
Answer 5 questions. Check each answer for an explanation.