Skip to content

Commit

Permalink
Fix GitHub Action “Setup Node.js” use-cache default
Browse files Browse the repository at this point in the history
Looks like our `use-cache` input sometimes defaults to null. This hasn’t been an issue before, but it caused problems with `actions/[email protected]`

See GitHub issue: actions/setup-node#797
(cherry picked from commit b8165f9)
  • Loading branch information
colinrotherham committed Jul 28, 2023
1 parent 59b61dd commit 9034932
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Setup
inputs:
use-cache:
description: Restore global `~/.npm` cache
required: false
default: 'true'
required: true

runs:
using: composite
Expand All @@ -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

0 comments on commit 9034932

Please sign in to comment.