elgohr / Publish-Docker-Github-Action

A Github Action used to build and publish Docker images
MIT License
781 stars 209 forks source link

[BUG] ::set-output deprecated in actions #167

Closed coldino closed 1 year ago

coldino commented 2 years ago

Describe the bug Thanks very much for this action. Been using it for a while now and just noticed the following in my logs:

Warning: 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/

Additional context The linked notice says the currently used method will stop working 31st May 2023, but has a pretty simple fix. Unfortunately, that means anyone who pins the version of this action will be in for a surprise on that date.

elgohr commented 2 years ago

Hi, as you can see in https://github.com/elgohr/Publish-Docker-Github-Action/commit/93655185f260b851ede78d9a57760a8bbda65f68 this action supports the new syntax since the day it was announced. Nevertheless the action also supports the old syntax (which is leading to this error), as this would be a breaking change otherwise. In this way people can have a smooth transition in their workflows.

I will keep this issue open until the 31st May 2023, so that we avoid duplicates.

coldino commented 2 years ago

Ah, thank you. I did search issues and check the main branch, but apparently this fix is elsewhere. Thanks for your continued work.

phnx47 commented 2 years ago

@elgohr Hi! I checked commit, you switch from Output to Env. But can continue use Output with new syntax: echo "{name}={value}" >> $GITHUB_OUTPUT. It will be not breaking changes. Any reason why you want use Env instead of Output?

I can raise a PR for this :)

elgohr commented 2 years ago

@phnx47 good catch - no, this is a bug. Would be happy for a PR regarding GITHUB_ENV -> GITHUB_OUTPUT. I would like to keep set-output for now, to be really sure.

phnx47 commented 2 years ago

@elgohr Oh, sorry, you edited message. I will raise one more PR

phnx47 commented 2 years ago

@elgohr

Just replaced GITHUB_ENV -> GITHUB_OUTPUT: https://github.com/elgohr/Publish-Docker-Github-Action/pull/171

Here I removed legacy output, you can check it too: https://github.com/elgohr/Publish-Docker-Github-Action/pull/170

elgohr commented 1 year ago

Please see https://github.com/elgohr/Publish-Docker-Github-Action/releases/tag/v5