What node version used if not specified it in Github Actions

Viewed 293

there.

My Github Actions have been failed day before yesterday. But, 3days ago successed.

I searched on log, failed on yarn install because using Node.js version 16.

My modules can build on Node.js 14. then, I specify Node.js version on workflows,

      - name: Set up Node js
        uses: actions/setup-node@v2
        with:
          node-version: '14.14.0'

Why My Github actions use Node.js version 16 suddenly?

How does Github actions decided Node.js version if not specified Node version?

Do you have any idea?

2 Answers

Since Sept. 2022, it is clearer:

GitHub Actions: All Actions will begin running on Node16 instead of Node12

Node 12 has been out of support since April 2022, as a result we have started the deprecation process of Node 12 for GitHub Actions.
We plan to migrate all actions to run on Node16 by Summer 2023.
We will monitor the progress of the migration and listen to the community for how things are going before we define a final date.

To raise awareness of the upcoming change, we are adding a warning into workflows which contain Actions running on Node 12.
This will come into effect starting on September 27th.

What you need to do

Related