Address use of deprecated GitHub Actions command `set-output`
Closed this issue · 1 comments
Task
Description
All GitHub Actions workflows should be updated to not rely on set-output
or save-state
which, per the following warnings that may be seen on current workflow runs (example), have been deprecated:
The
set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
At the time of writing, this warning can be seen on runs of the following workflows of this project:
code-analysis.yml
Note: Fixed by #392
This is due to the use of @actions/core@v1.9.1
in v2.1.27 of the CodeQL Action. This is already fixed in the CodeQL Action, but not yet released. This will be addressed automatically by the regular Renovate Pull Requests.
code-checks.yml
Note: Fixed by #412
This is due to the use of echo "::set-output name=xxx::yyy"
in embedded scripts in the "Determine jobs" job. This must be addressed manually.
Suggested solution
Based on github/codeql-action@v2.1.27...v2.1.28 it looks like changing the workflow as follows should work:
- echo "::set-output name=xxx::$yyy"
+ echo "xxx=$yyy" >> $GITHUB_OUTPUT
Related
#399 introduced the gitleaks/gitleaks-action Action in the audit.yml
workflow which, as of v2.3.0, still uses @actions/core@v1.9.1
as well. There's an open Pull Request in the repository to update this. As such, it is expected this will be addressed automatically by the regular Renovate Pull Requests.