Skip to content

Bump @actions/cache to 5.1.0, handle cache write denied#1026

Open
jasongin wants to merge 1 commit into
actions:mainfrom
jasongin:update-actions-cache-5.1.0
Open

Bump @actions/cache to 5.1.0, handle cache write denied#1026
jasongin wants to merge 1 commit into
actions:mainfrom
jasongin:update-actions-cache-5.1.0

Conversation

@jasongin

Copy link
Copy Markdown

Description:

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings June 18, 2026 22:25
@jasongin jasongin requested a review from a team as a code owner June 18, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates setup-java’s dependency caching behavior by bumping @actions/cache to v5.1.0 and adjusting the action’s post-step cache save logic so it no longer reports a successful save when the cache library returns -1 (e.g., write denied with read-only tokens or reserve collisions).

Changes:

  • Bump @actions/cache to ^5.1.0 and update the action version to 5.3.0 (including lockfile).
  • Update src/cache.ts to treat saveCache() returning -1 as “not saved” (debug-log + early return) rather than logging a successful save.
  • Regenerate dist artifacts, update the Licensed dependency record, and adjust tests to cover the -1 return path.
Show a summary per file
File Description
src/cache.ts Avoids logging “Cache saved…” when @actions/cache.saveCache() returns -1 (not saved).
package.json Bumps action version to 5.3.0 and updates @actions/cache dependency to ^5.1.0.
package-lock.json Updates lockfile to reflect @actions/cache@5.1.0 and version 5.3.0.
dist/setup/index.js Updates bundled output to include new cache write-denied handling and regenerated artifacts.
dist/cleanup/index.js Updates bundled output to match regenerated cache handling behavior.
.licenses/npm/@actions/cache.dep.yml Updates Licensed metadata for @actions/cache to 5.1.0.
tests/cache.test.ts Updates/extends coverage for the saveCache() => -1 “not saved” behavior (debug log, no “saved” info log).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/7 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants