Debug-action-cache Verified Jun 2026

CACHE_PATH="$1" EXPECTED_HASH="$2"

Mastering the Action Cache: A Complete Guide to Debugging Cache Misses and Optimizing CI/CD Build Systems debug-action-cache

Check the tab for your workflow run. Expand the "Post" or "Restore" steps for the cache to see the status: Success : You will see Cache restored from key: . | Problem | Likely cause | Debug check

# On the self-hosted machine sudo find / -name "node_modules" -path "*/actions-runner/_work/*" -type d debug-action-cache

Add ACTIONS_STEP_DEBUG=true to your repo right now and re-run your last failed workflow – you’ll likely spot the cache issue within minutes.

| Problem | Likely cause | Debug check | |--------|--------------|--------------| | Cache miss every run | Key includes github.sha or github.run_id | Log the key — is it changing? | | Cache saved every run | Key too specific + no restore-keys | Add a broader restore-keys | | Cache too large (>10 GB) | Unnecessary files | List cached dir content in debug mode | | Cache not restored on pull_request | Different branch base | Use restore-keys without branch hash |