#!/bin/bash # Debug Action Cache Script set -e
Also, do you want me to make a more formal or a more casual report?
- name: Report cache metrics run: | if [ -d "node_modules" ]; then echo "cache_status=hit" >> $GITHUB_OUTPUT else echo "cache_status=miss" >> $GITHUB_OUTPUT fi
key: debug-test-$ github.run_id -$ hashFiles('**/package-lock.json')
Before we debug, we must understand the architecture. When a CI job runs, it typically starts in a fresh, ephemeral environment. Without caching, every job would re-download dependencies (npm, pip, Maven, apt), re-compile code, or re-pull Docker layers.
: Use the mxschmitt/action-tmate action to pause your workflow and SSH into the runner. This allows you to manually check if the files were actually restored to the directory you expected.