Skip to content
Latchkey

act "actions/cache" is a no-op running Actions locally

GitHub caching is backed by a hosted cache service. act has no such service by default, so actions/cache restore always misses and save is effectively a no-op. Nothing errors, but you get no speedup and cannot test cache hits.

What this error means

Under act, actions/cache reports "Cache not found" every run and later steps rebuild from scratch, even though the same cache hits on GitHub.

act
Cache not found for input keys: node-modules-${{ hashFiles('package-lock.json') }}
| Cache service is not available; skipping save.

Common causes

No hosted cache service locally

act does not run the GitHub cache backend, so there is nothing to store or restore from between runs.

Cache-hit-dependent logic cannot be exercised

Steps gated on cache-hit == true never take the hit path under act because restore always misses.

How to fix it

Do not rely on cache hits locally

Treat cache steps as no-ops under act and rebuild; validate real cache behavior on GitHub.

Use an external cache server if you must test caching

Point actions/cache at a self-hosted cache server by setting ACTIONS_CACHE_URL, or run act with its cache-server support, when local cache testing is essential.

Terminal
# run act's built-in artifact/cache server when available
act --cache-server-path /tmp/act-cache -j build

How to prevent it

  • Expect actions/cache to miss under act; do not depend on it locally.
  • Guard cache-hit-only steps so local runs still pass.
  • Verify cache keys and hit rates on GitHub, not act.

Frequently asked questions

What causes "actions/cache does nothing under act"?
act does not run the GitHub cache backend, so there is nothing to store or restore from between runs.
How do I fix actions/cache does nothing under act?
Treat cache steps as no-ops under act and rebuild; validate real cache behavior on GitHub.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card