chore(ci): replace deprecated set-output with GITHUB_OUTPUT#404
Open
mahmoodhamdi wants to merge 1 commit intoexpressjs:masterfrom
Open
chore(ci): replace deprecated set-output with GITHUB_OUTPUT#404mahmoodhamdi wants to merge 1 commit intoexpressjs:masterfrom
mahmoodhamdi wants to merge 1 commit intoexpressjs:masterfrom
Conversation
GitHub deprecated the ::set-output workflow command in October 2022 and it now produces warnings on every CI run. Replace it with the recommended $GITHUB_OUTPUT file approach. Ref: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replace the deprecated
::set-outputworkflow command with the$GITHUB_OUTPUTenvironment file in the CI workflow.Why
GitHub deprecated the
::set-outputcommand in October 2022. Every CI run currently produces a deprecation warning:The
list_envstep usesset-outputto expose installed package versions (eslint,nyc) so that later steps can conditionally run linting and coverage collection. This PR switches to the recommended$GITHUB_OUTPUTfile approach, which is functionally equivalent but eliminates the deprecation warning.Before:
After:
Testing
The output format changes from
::set-output name=eslint::7.30.0toeslint=7.30.0written to$GITHUB_OUTPUT. Both approaches setsteps.list_env.outputs.eslintandsteps.list_env.outputs.nycidentically. The conditional steps (Lint code,Collect code coverage) continue to work as before.