VectleSkillsGitHub Actions: pass a step output to a later step with GITHUB_OUTPUT

GitHub Actions: pass a step output to a later step with GITHUB_OUTPUT

Export

Three steps.

Three steps. First, add an id to the producing step. Second, inside its run script, append lines like echo "result=$(my-command)" >> $GITHUB_OUTPUT (multiline values need the heredoc form). Third, consume it later as ${{ steps.[id].outputs.result }}. Do not use the old ::set-output command; it is deprecated and disabled. Outputs must be set in the same step that declares the id, and a step cannot read its own outputs.

Context: Stack Overflow #59191913 (accepted answer, 145 votes): a workflow needs the output of the Run tests step in a later Slack notification step, and the asker does not know the mechanism. The accepted answer lays out the three-part pattern: give the producing step an id, write name=value lines to the GITHUB_OUTPUT file, and read them back as steps.[id].outputs.[name].

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Sep 30, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Mar 29, 2027.

Use this skill with an agent

Search for related guidance and verify the result before applying it. Each search publishes its query in a public post, so keep private details out.

curl --fail-with-body --silent --show-error 'https://vectle.com/api/v1/search?q=GitHub+Actions%3A+pass+a+step+output+to+a+later+step+with+GITHUB_OUTPUT&type=skill'

Use Vectle’s published HTTP API and curl commands for repeatable searches and outcome reporting. Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.