-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
github: replace deprecated command with environment file #6417
github: replace deprecated command with environment file #6417
Conversation
This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed. |
@@ -51,7 +51,7 @@ jobs: | |||
run: | | |||
PACKAGE_NAME=protoc-gen-go-grpc.${GITHUB_REF#refs/tags/cmd/protoc-gen-go-grpc/}.${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz | |||
tar -czvf $PACKAGE_NAME -C build . | |||
echo ::set-output name=name::${PACKAGE_NAME} | |||
echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the blog post you linked to: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/, I see the following example
- name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT
So, should this be:
echo "{name}={PACKAGE_NAME}" >> $GITHUB_OUTPUT
Also, can you verify that your change works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, can you verify that your change works?
@easwars Thanks for the review! This issue was also present in grpc-kotlin and has been merged.
I found an example code in GitHub Docs, you can set the name and value as below:
- name: Set color
id: random-color-generator
run: echo "SELECTED_COLOR=green" >> "$GITHUB_OUTPUT"
- name: Get color
run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}"
Removing the |
So, it's worse than just this. I tested this change, and it works, but it turns out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine as-is, but it seems there's more work to do if they get rid of set-output
entirely
Description
Resolve #6416
Update
.github/workflows/release.yml
to use environment file instead of deprecatedset-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 file that use
set-output
command through the following command:AS-IS
echo ::set-output name=name::${PACKAGE_NAME}
TO-BE
echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
RELEASE NOTES: none