mirror of
https://github.com/actions/toolkit.git
synced 2026-08-11 00:00:28 +02:00
feat: backport cache read-denied + ACTIONS_CACHE_MODE handling (5.2.0)
Backport of the read-denied and ACTIONS_CACHE_MODE cache-mode gating from the ESM v6.2.0 line (#2447) to the CommonJS v5 line, released as 5.2.0. Mirrors the earlier write-denied backport (#2435, 5.1.0). - Detect the `cache read denied:` prefix on download failures (v2 twirp path and v1 `_apis/artifactcache` path) and surface it as a core.warning without failing the run. - Honor ACTIONS_CACHE_MODE: skip restore when the effective cache-mode does not permit reads (none, write-only) and skip save when it does not permit writes (none, read), logging a single non-fatal core.info line. Unset or unrecognized modes are unchanged. - Add read-denied and cache-mode tests; bump to 5.2.0 with RELEASES entry. Co-authored-by: Copilot App <[email protected]> Copilot-Session: e96deec1-716e-4e14-acdf-a230139420a2
This commit is contained in:
co-authored by
Copilot App
parent
c6ca5e729f
commit
3b3db3879e
Vendored
+5
@@ -1,5 +1,10 @@
|
||||
# @actions/cache Releases
|
||||
|
||||
### 5.2.0
|
||||
|
||||
- Handle cache read error due to read-only token: detect the `cache read denied:` prefix on cache download failures (both the v2 twirp path and the v1 `_apis/artifactcache` path) and surface it as a `core.warning` (without failing the run).
|
||||
- Honor the `ACTIONS_CACHE_MODE` environment variable: skip restore when the effective cache-mode does not permit reads (`none`, `write-only`) and skip save when it does not permit writes (`none`, `read`), logging a single non-fatal `core.info` line. When `ACTIONS_CACHE_MODE` is unset or unrecognized, behavior is unchanged.
|
||||
|
||||
### 5.1.0
|
||||
|
||||
- Handle cache write error due to read-only token: detect the `cache write denied:` prefix on cache reservation failures and surface it as a `core.warning` (without failing the run).
|
||||
|
||||
Reference in New Issue
Block a user