Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions github-actions/npm/checkout-and-setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,18 @@ runs:
run: |
PM=$(jq -r '.packageManager | match("^(npm|pnpm|yarn)@").captures[0].string' package.json || echo "")
echo "PACKAGE_MANAGER=$PM" >> "$GITHUB_OUTPUT"
if [ "$PM" == "pnpm" ]; then
echo "CACHE_MANAGER_VALUE=pnpm" >> "$GITHUB_OUTPUT"
fi

- if: steps.packageManager.outputs.PACKAGE_MANAGER == 'pnpm'
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
run_install: false

- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: ${{ inputs.node-version-file-path }}
node-version: ${{ inputs.node-version }}
cache-dependency-path: ${{ inputs.cache-dependency-path }}
package-manager-cache: ${{ inputs.disable-package-manager-cache != 'true' }}
cache: ${{ inputs.disable-package-manager-cache != 'true' && steps.packageManager.outputs.CACHE_MANAGER_VALUE || '' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be a boolean or a string of the package manager? Where do we set CACHE_MANAGER_VALUE to e.g. yarn?

Copy link
Contributor Author

@alan-agius4 alan-agius4 Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's supposed to be a string.

https://github.com/actions/setup-node/blob/2028fbc5c25fe9cf00d9f06a71cc4710d4507903/action.yml#L24-L25

CACHE_MANAGER_VALUE is set above, as part of this change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks. Isn't CACHE_MANAGER_VALUE only set for pnpm? is that expected because we only use pnpm at this point? If so, LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Loading