Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Updates to github actions - warnings on action run #356

Closed
shay-ul opened this issue Nov 7, 2022 · 12 comments · Fixed by #361
Closed

Updates to github actions - warnings on action run #356

shay-ul opened this issue Nov 7, 2022 · 12 comments · Fixed by #361

Comments

@shay-ul
Copy link

shay-ul commented Nov 7, 2022

Hi,
when running this action, Github Actions shows two errors:

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: peterjgrainger/action-create-branchShow less
 
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/

How to fix:

  1. Update Node.js actions to Node.js 16
  2. change "set-output" according to the following:
    https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
@shay-ul
Copy link
Author

shay-ul commented Nov 7, 2022

Hi @peterjgrainger
I've been using this awesome action and it helps me a lot :)
Are you aware of this issue?
Any chance you could take a look?

@peterjgrainger
Copy link
Owner

Yeah, sure @shay-ul. Seems pretty straightforward

@peterjgrainger
Copy link
Owner

@shay-ul released version v2.3.0 have a look and see if that sorts it out.

I've added a new warning to stop using the set output, I'll remove this on the next major release of the action.
Screenshot 2022-11-15 at 09 50 40

@phandrysik-fp
Copy link

phandrysik-fp commented Nov 15, 2022

@peterjgrainger I think that instead of removing the output from the action you can simply update @actions/core package to version 1.10.0. The set-output thing was fixed in this pull request.

You'll still be able to use core.setOutput but it won't use the deprecated set-output command.

@peterjgrainger
Copy link
Owner

@phandrysik-fp what happens if someone is relying on the output? Is it a breaking change?

@phandrysik-fp
Copy link

phandrysik-fp commented Nov 16, 2022

That's precisely my point, I think that it's not a breaking change...

I found more info on the topic here https://github.com/orgs/community/discussions/35994
I haven't tested it yet but it should be easy to test in a workflow if the output of your action is still there.

@Carsten-MaD
Copy link

Carsten-MaD commented Nov 16, 2022

Hey!

I just started to use this action and saw the same problem.

@peterjgrainger you don't need to switch to using environment variables, you can still use output; only set-output got deprecated. Like that, you would not introduce a breaking change.

Have a look here (bottom of the page): https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/#examples

@tobiasehlert
Copy link

@phandrysik-fp what happens if someone is relying on the output? Is it a breaking change?

@peterjgrainger, it's not a breaking change.
If you change the way you output, all workflow users will just as normal :)

@secondmanveran
Copy link

Here are the current warnings being seen as of today 11.21.22:

Screenshot 2022-11-21 at 7 36 17 AM

It would be great if we could get updates for this ASAP.

Thanks

@kuhnroyal
Copy link

Yea, no need to mess around with ENV variables. Just update actions/core to a newer version where setOutput is correctly implemented and remove the BRANCH_CREATED again.

@peterjgrainger
Copy link
Owner

@kuhnroyal @secondmanveran see latest release v2.4.0.

No warnings :)

@secondmanveran
Copy link

Thanks mate.

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

Successfully merging a pull request may close this issue.

7 participants