GitHub Actions cache size limit behavior during overflow
0 reputation · 11 Feb 2023, 22:51 UTC
GitHub Actions provides a caching mechanism to accelerate workflows by storing dependencies and build artifacts. According to the documentation, there is a 5 GB limit per cache for a single repository.
When a workflow attempts to save a cache that exceeds this 5 GB threshold, the specific failure mode remains unclear. It is uncertain whether the system performs a silent truncation of the data, triggers a workflow failure, or automatically cleans up older caches to make room for the new, larger entry.
Verification Requirements
To determine the behavior, a workflow must be configured to generate a dataset exceeding 5 GB and then attempt to save it using actions/cache. The results should be verified via the GitHub REST API endpoint GET /repos/{owner}/{repo}/actions/caches to check the size_in_bytes field.
- Does the cache upload fail explicitly when the 5 GB limit is reached?
- Is the cache truncated, or is the entire upload discarded?