Use the `steps` context to consume a step output.
Section: Env files, step outputs, and job outputs
Read a previous step output
yaml
yaml
- id: version
run: echo "value=1.2.3" >> "$GITHUB_OUTPUT"
- run: echo "Version is ${{ steps.version.outputs.value }}"Explanation
Give the producing step an `id` so later steps can reference its outputs.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Env files, step outputs, and job outputs
Set an environment variable for later steps
Append to `GITHUB_ENV` to persist a variable in the current job.
Promote a step output to a job output
Pass values between jobs through `needs`.
Write a multiline value to GITHUB_OUTPUT
Preserve newlines in an output variable.
Use repository or organization variables
Read configuration values from the `vars` context.