Skip to content

Replace deprecated set-output command with environment file - #172691

Merged
João Moreno (joaomoreno) merged 1 commit into
microsoft:mainfrom
jongwooo:chore/replace-deprecated-command-with-environment-file
Jan 31, 2023
Merged

Replace deprecated set-output command with environment file#172691
João Moreno (joaomoreno) merged 1 commit into
microsoft:mainfrom
jongwooo:chore/replace-deprecated-command-with-environment-file

Conversation

@jongwooo

@jongwooo Jongwoo Han (jongwooo) commented Jan 28, 2023

Copy link
Copy Markdown
Contributor

Signed-off-by: jongwooo jongwooo.han@gmail.com

Description

Resolve #172689

Update workflows to use environment file instead of deprecated set-output command.
For more information, see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

I found the workflow files that use set-output command through the following command:

$ find .github/workflows -name '*.yml' | xargs egrep '\bset-output\b'

AS-IS

run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
run: echo "::set-output name=dir::$(yarn cache dir)"

TO-BE

run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

@jongwooo

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Signed-off-by: jongwooo <jongwooo.han@gmail.com>
@joaomoreno

Copy link
Copy Markdown
Contributor

Thanks!

@joaomoreno
João Moreno (joaomoreno) merged commit e4b9950 into microsoft:main Jan 31, 2023
@jongwooo
Jongwoo Han (jongwooo) deleted the chore/replace-deprecated-command-with-environment-file branch January 31, 2023 11:47
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated set-output command with environment file

5 participants