A step has 'id: get-version' and outputs to $GITHUB_OUTPUT. How do you reference its 'version' output in a later step?
Select an answer to reveal the explanation.
Short Explanation and Infographic
The 'steps' context (plural) holds all prior steps by their id — steps.your-id.outputs.name is the full path.
Full explanation below image
Full Explanation
The 'steps' context (plural, not 'step') provides access to step outputs and outcomes within the same job. The path is '${{ steps.<step_id>.outputs.<output_name> }}'. In addition to 'outputs', the steps context provides 'outcome' (the result before continue-on-error: success/failure/cancelled/skipped) and 'conclusion' (result after continue-on-error). Step IDs must be unique within a job. 'step.' (singular), 'output.', and 'job.steps.' are not valid context paths.