Skip to content

feat: add caching to self-hosted Renovate workflow#509

Merged
erezrokah merged 10 commits intomainfrom
claude/add-renovate-caching-afhl2
Mar 18, 2026
Merged

feat: add caching to self-hosted Renovate workflow#509
erezrokah merged 10 commits intomainfrom
claude/add-renovate-caching-afhl2

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Mar 17, 2026

Add caching support to renovate

claude added 7 commits March 17, 2026 21:45
Add actions/cache restore/save steps to persist /tmp/renovate/cache
between runs. The cache key includes the Renovate version so it
busts on upgrades, and uses run_id to ensure each run saves fresh data.

Also enable repositoryCache in the self-hosted config so Renovate
maintains per-repo JSON caches that speed up extraction.

https://claude.ai/code/session_0188Gs8tZPdjYXk24NdU1D6m
GitHub Actions caches are immutable, so delete the existing cache
via gh CLI before saving the updated one. Removes run_id from the
key since we now explicitly delete and re-create each run.

https://claude.ai/code/session_0188Gs8tZPdjYXk24NdU1D6m
Skip cache delete/save if Renovate failed to avoid persisting
a potentially bad cache state.

https://claude.ai/code/session_0188Gs8tZPdjYXk24NdU1D6m
Add id to restore step and condition the delete step on cache-hit,
avoiding a needless gh cache delete call on first run or after
version bumps.

https://claude.ai/code/session_0188Gs8tZPdjYXk24NdU1D6m
Add a regex custom manager so Renovate can detect and update its own
version defined as the RENOVATE_VERSION env var in workflow files.

https://claude.ai/code/session_0188Gs8tZPdjYXk24NdU1D6m
This manager is only needed in this repo, not in the shared default
config.

https://claude.ai/code/session_0188Gs8tZPdjYXk24NdU1D6m
@erezrokah erezrokah requested a review from a team as a code owner March 17, 2026 22:03
@erezrokah erezrokah requested review from Copilot and stoovon and removed request for a team March 17, 2026 22:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR speeds up the self-hosted Renovate GitHub Actions workflow by persisting Renovate’s on-disk cache between runs and enabling Renovate’s per-repository JSON cache.

Changes:

  • Add cache restore/save steps for /tmp/renovate/cache in the Renovate workflow, and centralize the Renovate CLI version in RENOVATE_VERSION.
  • Enable repositoryCache in the self-hosted Renovate config.
  • Add a Renovate customManager to automatically update the pinned RENOVATE_VERSION in the workflow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/renovate.yml Restores/saves Renovate cache and introduces RENOVATE_VERSION env var used by the action.
.github/self-hosted-renovate.js Enables Renovate repositoryCache to speed up repeated runs.
.github/renovate.json5 Adds a regex custom manager to keep RENOVATE_VERSION up to date automatically.

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

claude added 2 commits March 17, 2026 22:09
Append github.run_id to the cache key so each run saves a unique cache
entry, and use restore-keys prefix matching to pick up the latest one.
This removes the need to delete the previous cache.

https://claude.ai/code/session_0188Gs8tZPdjYXk24NdU1D6m
@erezrokah erezrokah requested a review from mnorbury March 17, 2026 22:11
uses: actions/cache@v4
with:
path: /tmp/renovate/cache
key: renovate-cache-${{ env.RENOVATE_VERSION }}-${{ github.run_id }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds caching support to the repo’s self-hosted Renovate setup to speed up repeated runs and centralize Renovate version pinning.

Changes:

  • Introduces a workflow-level RENOVATE_VERSION env var and uses it for the Renovate action input.
  • Adds an actions/cache step intended to persist Renovate cache data across runs.
  • Enables Renovate repository caching and adds a Renovate custom regex manager to keep RENOVATE_VERSION up to date automatically.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/renovate.yml Adds cache step and moves Renovate version to a workflow env var used by the action.
.github/self-hosted-renovate.js Enables Renovate repository caching.
.github/renovate.json5 Adds a regex-based custom manager to update RENOVATE_VERSION in the workflow.

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

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@erezrokah erezrokah merged commit 263b230 into main Mar 18, 2026
3 checks passed
@erezrokah erezrokah deleted the claude/add-renovate-caching-afhl2 branch March 18, 2026 12:46
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.

4 participants