standard-ruby-action icon indicating copy to clipboard operation
standard-ruby-action copied to clipboard

This action produces a warning: Node.js 20 actions are deprecated.

Open jagthedrummer opened this issue 6 months ago • 6 comments

The full message is:

Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

I'm using standardrb/standard-ruby-action@v1 as shown in the docs.

jagthedrummer avatar May 04 '26 17:05 jagthedrummer

I looked into making a PR to address this but... it seems like something weird must be going on.

I see that this repo consistently references actions/checkout like this:

uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

That commit SHA does seem to be v6 of actions/checkout and not v4.

I haven't been able to figure out where the warning is coming from.

Our workflow that calls this action is extremely simple: https://github.com/bullet-train-co/bullet_train/blob/jeremy/update-gha-for-node20/.github/workflows/_standardrb.yml

jagthedrummer avatar May 04 '26 19:05 jagthedrummer

I also have this issue.

(Additionally, the link by @jagthedrummer is broken)

jonathandean avatar Jun 08 '26 04:06 jonathandean

I dug around a bit in the repo referenced by @jagthedrummer (adjusting the url for main instead of the merged branch) and the same issue still happens with standardrb/[email protected] instead of standardrb/standard-ruby-action@v1, which is the latest release.

      - name: Standard Ruby
        uses: standardrb/[email protected]
        with:
          autofix: false

jonathandean avatar Jun 08 '26 04:06 jonathandean

~I don't think there's anything to be done here?~ The update docs from github are for javascript actions, but this action is a composite action, not a javascript action.

If anyone finds any documentation from github that describes what (if any) steps are applicable to composite actions, we're open to a PR.

edit ah, apologies, I think we just need to tag a release. If anyone is willing to try their existing workflows pointing to standard-ruby-action@main to confirm, that should have all the dependent actions bumped to versions that use node24.

jasonkarns avatar Jun 11 '26 18:06 jasonkarns

It seems that GitHub uses the version number to guess whether it runs with Node.js 20 or 24. When using actions/checkout with a commit version it can't figure out. The warning is displayed even if the code runs on Node 24. It's a false positive.

I've cloned the repo and changed the commit number to the corresponding version (v7.0.1), and the warning was gone.

wacko avatar Aug 05 '26 19:08 wacko

v1.6.0 was tagged and released, so anyone using v1 pins should no longer have the warning.

jasonkarns avatar Aug 10 '26 18:08 jasonkarns