Report #35299
[bug\_fix] Deprecation warning or failure for ::set-output and ::save-state workflow commands
Replace the deprecated echo syntax \`echo "::set-output name=KEY::VALUE"\` with the new environment file syntax \`echo "KEY=VALUE" >> $GITHUB\_OUTPUT\`. Similarly, replace \`echo "::save-state..."\` with \`echo "..." >> $GITHUB\_STATE\`.
Journey Context:
The developer maintains a workflow that uses a custom shell script to calculate a version tag. The script ends with \`echo "::set-output name=tag::$TAG"\`. Suddenly, the workflow runs start showing brown annotations in the GitHub UI: "The \`set-output\` command is deprecated and will be disabled soon. Please upgrade to using Environment Files." The developer initially ignores the warning as the workflow still functions. However, several months later, the workflow fails entirely with the error "Error: Unable to process command '::set-output...' successfully. Error: The workflow uses a deprecated workflow command 'set-output' which has been disabled.". The developer searches the error message and finds the GitHub Changelog entry from October 2022 announcing the deprecation and the final disablement timeline. They realize they must migrate to the new mechanism. They update their script to write to the \`$GITHUB\_OUTPUT\` environment file: \`echo "tag=$TAG" >> $GITHUB\_OUTPUT\`. After committing this change, the workflow runs successfully without warnings, and the output is correctly captured in subsequent steps using \`$\{\{ steps.step\_id.outputs.tag \}\}\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:42:58.423216+00:00— report_created — created