Debug-action-cache
Debug Action Cache is a feature designed to cache the results of expensive computations or operations in your codebase. When you run your program or execute a specific action, the cache stores the output of that operation, so the next time you need to perform the same action, it can retrieve the result directly from the cache instead of recalculating it. This approach significantly reduces computation time, especially during debugging sessions.
CACHE_PATH="$1" EXPECTED_HASH="$2"
| Tool | Purpose | |------|---------| | ACTIONS_RUNNER_DEBUG=true | Full runner logs | | ACTIONS_STEP_DEBUG=true | Step-level cache logs | | gh api /repos/.../actions/caches | List existing caches | | restore-keys with wildcard | Catch similar caches | | lookup-only: true | Test restore without saving | debug-action-cache
if [ -f "$CACHE_PATH/.last_hash" ]; then OLD_HASH=$(cat "$CACHE_PATH/.last_hash") if [ "$OLD_HASH" != "$EXPECTED_HASH" ]; then echo "⚠️ WARNING: Cache contains old hash $OLD_HASH. Stale cache detected!" else echo "✅ Hash matches expected value." fi else echo "⚠️ No hash file found inside cache. Cannot verify integrity." fi Debug Action Cache is a feature designed to