peterjgrainger / action-create-branch

Github action to create a branch
MIT License
92 stars 29 forks source link

Updates to github actions - warnings on action run #356

Closed shay-ul closed 1 year ago

shay-ul commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Yeah, sure @shay-ul. Seems pretty straightforward

peterjgrainger commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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

phandrysik-fp commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@kuhnroyal @secondmanveran see latest release v2.4.0.

No warnings :)

secondmanveran commented 1 year ago

Thanks mate.