Skip to content
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

set-output is going to be deprecated in 2023 #10

Closed
greatislander opened this issue Nov 5, 2022 · 8 comments
Closed

set-output is going to be deprecated in 2023 #10

greatislander opened this issue Nov 5, 2022 · 8 comments

Comments

@greatislander
Copy link

First of all, thanks for the great workflow! I got a deprecation warning when using it related to this: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

I think the change in helpers/Output would be fairly minimal and I'd be happy to file a PR if you would be open to that. Thanks in advance.

@johanvanhelden
Copy link
Owner

Great to hear you like the action.

If you would be able to PR the modification, I'd really appreciate it! Thanks!

@jospapePAQT
Copy link
Contributor

UP

johanvanhelden added a commit that referenced this issue Nov 9, 2022
issue: #10 changed set-output to GITHUB_OUTPUT
@johanvanhelden
Copy link
Owner

The fix has been released, thanks @jospapePAQT !

@pfy-oleksii-storozhylov

No warnings anymore, but I have empty value while trying to access coverage and other values

${{ steps.coverage.outputs.coverage }}

@jospapePAQT
Copy link
Contributor

No warnings anymore, but I have empty value while trying to access coverage and other values

${{ steps.coverage.outputs.coverage }}

it is now stored in $GITHUB_OUTPUT

echo "${{ env.steps.coverage.outputs.coverage }}" # This will output the coverage

@greatislander
Copy link
Author

No warnings anymore, but I have empty value while trying to access coverage and other values

${{ steps.coverage.outputs.coverage }}

it is now stored in $GITHUB_OUTPUT

echo "${{ env.steps.coverage.outputs.coverage }}" # This will output the coverage

The README is not up to date anymore.

@pfy-oleksii-storozhylov
Copy link

pfy-oleksii-storozhylov commented Nov 14, 2022

No warnings anymore, but I have empty value while trying to access coverage and other values

${{ steps.coverage.outputs.coverage }}

it is now stored in $GITHUB_OUTPUT

echo "${{ env.steps.coverage.outputs.coverage }}" # This will output the coverage

It doesn't work for me as well :(
Also in docs I found that env. should not be used for getting output step value https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-3
But the weird thing they propose to use (and it works for me)

echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT

But in action logs I see output with ## symbols:

##"coverage=99.438202247191" >> $GITHUB_OUTPUT

@johanvanhelden
Copy link
Owner

@pfy-oleksii-storozhylov @greatislander @jospapePAQT

Apologies for the late response. Due to personal reasons I was unable to work on this sooner.

I have now pushed the fixes to the action in #13.

The README on how to use the output remains correct. It was simply a faulty implementation of setting the output in #11

So any new runs of the workflow should show proper output again, as you can see here:
https://github.com/johanvanhelden/gha-clover-test-coverage-check/actions/runs/3558639385/jobs/5977451791

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants