From 42e03d3446d7eed160de84eb82687de872824c8d Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Wed, 19 Jun 2024 19:09:08 -0400 Subject: [PATCH] CI: Install the same version of NodeJS that is specified in `.tool-versions` (#253) * Create a `.tool-versions` file with an entry for NodeJS 20 * CI: Install the same version of NodeJS that is specified in `.tool-versions` --- .github/workflows/checkin.yml | 2 +- .github/workflows/example-builds-defaultarch.yml | 2 +- .github/workflows/example-builds-nightly-defaultarch.yml | 2 +- .github/workflows/example-builds-nightly.yml | 2 +- .github/workflows/example-builds.yml | 2 +- .tool-versions | 1 + 6 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .tool-versions diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index 3cd5be27..39e67e18 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: '.tool-versions' - name: "npm ci" run: npm ci diff --git a/.github/workflows/example-builds-defaultarch.yml b/.github/workflows/example-builds-defaultarch.yml index 23740c85..c4b3f063 100644 --- a/.github/workflows/example-builds-defaultarch.yml +++ b/.github/workflows/example-builds-defaultarch.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-node@v4 if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} with: - node-version: 16 + node-version-file: '.tool-versions' - name: "Install dependencies" if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} diff --git a/.github/workflows/example-builds-nightly-defaultarch.yml b/.github/workflows/example-builds-nightly-defaultarch.yml index 6401cdfb..0c7464cf 100644 --- a/.github/workflows/example-builds-nightly-defaultarch.yml +++ b/.github/workflows/example-builds-nightly-defaultarch.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-node@v4 if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} with: - node-version: 16 + node-version-file: '.tool-versions' - name: "Install dependencies" if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} diff --git a/.github/workflows/example-builds-nightly.yml b/.github/workflows/example-builds-nightly.yml index 21190a65..3861206c 100644 --- a/.github/workflows/example-builds-nightly.yml +++ b/.github/workflows/example-builds-nightly.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-node@v4 if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} with: - node-version: 16 + node-version-file: '.tool-versions' - name: "Install dependencies" if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} diff --git a/.github/workflows/example-builds.yml b/.github/workflows/example-builds.yml index 0515b128..1471d980 100644 --- a/.github/workflows/example-builds.yml +++ b/.github/workflows/example-builds.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-node@v4 if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} with: - node-version: 16 + node-version-file: '.tool-versions' - name: "Install dependencies" if: ${{ ! startsWith(github.ref, 'refs/heads/releases') }} diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..d7568adf --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 20.11.1