GitHub Actions "Post job cleanup failed"
Many actions register a post step that runs after the job to save caches or remove credentials. A failure there is usually a transient upload error or a permissions/disk problem. On Latchkey managed runners, transient post-step upload failures are auto-retried.
What this error means
The job log shows a "Post" step (for example "Post Cache" or "Post Run actions/checkout") that fails after the main work succeeded.
Post job cleanup.
##[error]Cache service responded with 500 during cache save
##[warning]Failed to save cache.Common causes
Transient cache-save upload error
The cache backend returned a 5xx or timed out while the post step uploaded the archive.
No space or permission for cleanup
The post step could not write a temp archive or remove a file because the disk was full or the path was owned by a container user.
How to fix it
Reduce cache size and retry
- Re-run the job; transient upload errors usually clear on retry.
- If it persists, trim the cached paths so the archive fits and uploads reliably.
- For permission failures, ensure post steps can write to the workspace.
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
# smaller, well-scoped paths upload more reliablyHow to prevent it
- Keep cache archives small and well scoped to reduce post-step upload risk.
- Avoid leaving root-owned files that the post cleanup cannot remove.