-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support cache-hit
state
#316
Comments
Hello @pacexy. The action does not provide cache-hit for output. We can track it as an enchantment to add it. |
I've opened a pull request #327 |
@dmitry-shibanov what good is caching if we can't conditionally skip the step to install dependencies based on a cache hit? I'm not sure why you released caching without this critical step. And now, for two weeks there's been a Pull Request open that solves this issue for the community and it's sat unreviewed/untested for days because it requires maintainer approval for GHA to run on it |
@WtfJoke @dmitry-shibanov How is this supposed to work? I have the following workflow jobs:
dependencies:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
id: node
with:
node-version: "lts/*"
cache: "npm"
- run: npm ci
if: steps.node.outputs.cache-hit != 'true'
- run: npm run build Output of
But
Am I missing something? |
Hello @snebjorn. The action does not cache node_modules. It caches global cache directory. For more details please check section Caching packages dependencies in the Advanced usage guide. |
I see, sorry for the confusion |
uff... it's been a while. But I believe what he's saying is that it caches packages in ~/.npm/node_modules instead of in your repo. So basically you still need to run |
Gotcha, thanks! |
I wrote a workflow like follow, but I found nothing happened. Is that wrong or just unsupported?
The text was updated successfully, but these errors were encountered: