-
Notifications
You must be signed in to change notification settings - Fork 59
fix(github-actions): replace package-manager-cache with cache option in checkout-and-setup-node
#3151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ion in checkout-and-setup-node In `actions/setup-node` version 6 `package-manager-cache` is only supported for npm. See: actions/setup-node#1374
| 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 || '' }} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
CACHE_MANAGER_VALUE is set above, as part of this change.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
| 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 || '' }} |
There was a problem hiding this comment.
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
|
This PR was merged into the repository. The changes were merged into the following branches:
|
In
actions/setup-nodeversion 6package-manager-cacheis only supported for npm.See: actions/setup-node#1374