Bump @actions/cache to 5.1.0, log cache write denied (#746)

* Bump @actions/cache to 5.1.0, log cache write denied

* Add cache save failure test case

* Update dist

* Resolve high-severity audit issues
This commit is contained in:
Jason Ginchereau
2026-06-22 08:33:08 -10:00
committed by GitHub
parent dc3262dda8
commit 4406a635cd
18 changed files with 44364 additions and 67770 deletions

View File

@@ -47,7 +47,11 @@ const cachePackages = async () => {
}
const cacheId = await cache.saveCache([cachePath], primaryKey);
if (cacheId == -1) {
if (cacheId === -1) {
// saveCache returns -1 without throwing when the cache was not saved, e.g.
// a reserve collision or a read-only token (fork PR). @actions/cache has
// already logged the reason at the appropriate severity, so just trace it.
core.debug(`Cache was not saved for the key: ${primaryKey}`);
return;
}