Caches and artifacts
Persist the files you need through GitHub Actions.
A runner's filesystem is disposable. Use GitHub Actions cache and artifact actions to retain data between jobs.
Dependency caches
Keep your existing actions/cache usage or a setup action's supported cache option. Use lockfile hashes in cache keys so dependency changes produce a new cache. Cache access and retention follow GitHub's rules and your workflow permissions.
Docker builds
A new job does not inherit a previous machine's Docker layers. Use your build tool's supported remote cache, such as BuildKit's GitHub Actions cache backend, and keep cache scopes appropriate for your repository.
Host-local Docker layer caching, unlimited cache storage, running-service snapshots and cross-run local disks are not part of the current AWS offering.
Artifacts
Upload build outputs, reports and files needed by later jobs as GitHub Actions artifacts. Download them explicitly in the receiving job. Never rely on two jobs sharing a machine.
Do not include credentials or secret-bearing files in a cache or artifact. Files produced by untrusted code should be treated as untrusted input.