Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Actions - "Node.js 12 actions are deprecated." although I upgraded everything to v18

I get the warning

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

I know it's because v12 has been deprecated and is being removed, but I've changed my usages from v12 to v18 and I don't understand why I still get this warning. It should have vanished.

I've read the doc for Actions Maintainers at https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions

  • I only specify a nodejs version there: https://github.com/UnlyEd/github-action-await-vercel/blob/main/.github/workflows/update-codeclimate-coverage.yml#L24
  • I use "@actions/core": "1.10.0"

enter image description here

like image 470
Vadorequest Avatar asked Dec 14 '25 10:12

Vadorequest


1 Answers

I faced this issue when deploying a NextJS application using GitHub actions.

My job looked like this:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

The issue was with the actions/checkout@v2 which had be deprecated. All I had to do was to upgrade to actions/checkout@v3. So my job looked like this next:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

Resources: Example: Using versioned actions

like image 89
Promise Preston Avatar answered Dec 17 '25 01:12

Promise Preston



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!