From 7874ca487592e2ed2545df6f452e8e8d622f7cd2 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Thu, 13 Jul 2023 09:34:20 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20GitHub=20Action=20=E2=80=9CSetup=20Node.j?= =?UTF-8?q?s=E2=80=9D=20`use-cache`=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Looks like our `use-cache` input sometimes defaults to null. This hasn’t been an issue before, but it caused problems with `actions/setup-node@3.7.0` See GitHub issue: https://github.com/actions/setup-node/issues/797 --- .github/workflows/actions/setup-node/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions/setup-node/action.yml b/.github/workflows/actions/setup-node/action.yml index 069a6cef6e4..9a09118ff62 100644 --- a/.github/workflows/actions/setup-node/action.yml +++ b/.github/workflows/actions/setup-node/action.yml @@ -3,7 +3,8 @@ name: Setup inputs: use-cache: description: Restore global `~/.npm` cache - required: false + default: 'true' + required: true runs: using: composite @@ -14,5 +15,5 @@ runs: id: setup-node with: - cache: ${{ inputs.use-cache != 'false' && 'npm' || '' }} + cache: ${{ inputs.use-cache == 'true' && 'npm' || '' }} node-version-file: .nvmrc