step output
A named value a step writes as key=value to the file named by GITHUB_OUTPUT, which later steps read through the steps context.
In more detail
The runner reads the file after the step finishes and offers each key as steps.<id>.outputs.<key>. The step needs an id for this to work, and if the step appends nothing the expression is simply empty.
Example
echo "tag=1.4.0" >> "$GITHUB_OUTPUT"Related terms
- job output — A small string a job publishes in its outputs block so that jobs which need it can read it.
- workflow context — A named object, such as steps, needs, matrix, secrets or runner, that expressions read to get facts about the current run.
- workflow expression — Text inside ${{ and }} in a workflow file that GitHub evaluates before a step runs, such as ${{ github.sha }}.
Taught in
- Workflows, Jobs, Steps, and Actions — Continuous Integration & Continuous Delivery Pipelines
- Scaling with Matrix Builds — Continuous Integration & Continuous Delivery Pipelines
- Workflow Structure: Jobs, Env, Services, Commands And Anchors — GitHub Actions (GH-200) Exam Prep
- Reusable Workflows: Inputs, Secrets And Outputs Across A Call — GitHub Actions (GH-200) Exam Prep
- Outputs, Artifacts, Caches And Job Summaries — GitHub Actions (GH-200) Exam Prep
- action.yml: Inputs, Outputs, Runs And Branding — GitHub Actions (GH-200) Exam Prep