checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Deprecation Warning Output from GitHub Actions

Open mcichoski opened this issue 2 years ago • 4 comments

Behaviour

Warning: The 'save-state' 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/

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/

As per https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Steps to reproduce this Issue

  1. use actions/checkout@v3 to checkout a repository

mcichoski avatar Oct 12 '22 21:10 mcichoski

Behaviour

Warning: The 'save-state' 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/

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/

As per https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Steps to reproduce this Issue

  1. use actions/checkout@v3 to checkout a repository

I'm using github pages. The github-pages[bot] use actions/checkout@v2 automatically, I don't know how to change that.

cyhcyh avatar Oct 13 '22 12:10 cyhcyh

Hi @cyhcyh, this is expected as we're beginning to deprecate those workflow and started updating actions with a fix. We're back-porting that fix to checkout@v2 shortly to solve this for people that don't have control over the version of checkout that is being used, I'll report here as soon as that's done!

rentziass avatar Oct 13 '22 14:10 rentziass

Hi @cyhcyh, this is expected as we're beginning to deprecate those workflow and started updating actions with a fix. We're back-porting that fix to checkout@v2 shortly to solve this for people that don't have control over the version of checkout that is being used, I'll report here as soon as that's done!

That's great! Thank you!

cyhcyh avatar Oct 13 '22 15:10 cyhcyh

checkout@v2 is now pointing to v2.5.0 and warnings about workflow commands being deprecated should not happen anymore 🎉 Please do let me know if that is not the case!

rentziass avatar Oct 13 '22 16:10 rentziass

@rentziass still seeing this:

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: actions/checkout, actions/checkout, actions/upload-artifact, actions/checkout, actions/checkout

I even tried being explicit with uses: actions/[email protected], but seeing the same. Any ideas? 🤔

davetapley avatar Oct 17 '22 21:10 davetapley

@davetapley you need to use 3+ for that: https://github.com/actions/checkout/releases/tag/v3.0.0

2.5.0 was just a maintenance release for those who are still on v2 as far as I understand it.

TWiStErRob avatar Oct 18 '22 09:10 TWiStErRob

As I understand this is now fixed for both

  • v2 https://github.com/actions/checkout/pull/962 (released 2.5.0)
  • v3 https://github.com/actions/checkout/pull/939 (released 3.1.0)

@rentziass close as completed?

TWiStErRob avatar Oct 18 '22 09:10 TWiStErRob

That's correct, thanks for the help @TWiStErRob! Closing now.

rentziass avatar Oct 19 '22 10:10 rentziass

@rentziass I'm still getting this warning from action/checkout v2.5.0

theofficialgman avatar Nov 03 '22 02:11 theofficialgman

@theofficialgman I think you're better off creating a new issue with detail (screenshot, link, yml, logs).

TWiStErRob avatar Nov 03 '22 11:11 TWiStErRob

I can confirm v2.5.0 still seems to trigger the deprecation warning. Upgrading to v3.1.0 fixed it for me though.

jespertheend avatar Nov 12 '22 15:11 jespertheend

I am seeing the same issue in our repository. With checkout@v2 the deprecation warnings are there, after switching to checkout@v3 the warnings are gone. Upgrading to v3 fixed it for us.

annaesvensson avatar Nov 14 '22 12:11 annaesvensson

@davetapley

There are two different deprecation warning messages.

The original one from this issue was about save-state and set-output which @rentziass wrote is fixed for actions/checkout@v2 and actions/checkout@v3.

The other deprecation warning message "Node.js 12 actions are deprecated." mentioned by @davetapley is not fixed in actions/checkout@v2.

actions/checkout@v2 runs under node12 as can be seen by https://github.com/actions/checkout/blob/e2f20e631ae6d7dd3b768f56a5d2af784dd54791/action.yml#L74-L77 pointed to by https://github.com/actions/checkout/tree/v2

So, if you want to stop the "Node.js 12 actions are deprecated." warning from appearing, you need to update to actions/checkout@v3. @annaesvensson already wrote about this. The above is just an explanation for it.

MikeMcC399 avatar Dec 08 '22 10:12 MikeMcC399

I'm using actions/[email protected], but still getting the same warning: Warning: The `save-state` 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/

tal-lederman-dy avatar Mar 06 '23 14:03 tal-lederman-dy

@tal-lederman-dy

I'm using actions/[email protected], but still getting the same warning

Since this issue was already resolved in actions/checkout@v3 it is mostly likely that your problem has another origin. This could be from a step in the workflow or from calling another GitHub action.

I suggest to re-run your action with ACTIONS_STEP_DEBUG set true (see https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging) to get a better idea about where the warning might be coming from.

Here is an example log output from using an older version of another action:

::set-output name=dashboardUrl::
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/``

MikeMcC399 avatar Mar 06 '23 15:03 MikeMcC399