fix: Renovate cache permission errors in Docker container#515
Merged
fix: Renovate cache permission errors in Docker container#515
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the self-hosted Renovate GitHub Actions workflow to avoid cache permission/path issues when the Renovate action runs in a Docker container.
Changes:
- Adds a step to pre-create the Renovate cache directory and adjust permissions.
- Sets
RENOVATE_CACHE_DIRto/tmp/renovate/cacheto ensure the container uses a valid, writable path.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the self-hosted Renovate GitHub Actions workflow to avoid cache permission issues when Renovate runs inside its container, aiming to eliminate EACCES errors introduced with the caching changes from #509.
Changes:
- Add a workflow step that creates the Renovate cache directory and relaxes its permissions.
- Set
RENOVATE_CACHE_DIRto a fixed path (/tmp/renovate/cache) to avoid the action’s auto-detected cache location.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The renovatebot/github-action auto-sets RENOVATE_CACHE_DIR to a path under /home/runner which doesn't exist inside the Docker container. Additionally, cache files restored by actions/cache are owned by the runner user, not the container user (uid 1000). - Set RENOVATE_CACHE_DIR=/tmp/renovate/cache explicitly - Add step to create cache dir with world-writable permissions
99c0be5 to
7be5ea3
Compare
Address review feedback: chown to uid 1000 (Renovate container user) instead of chmod 777 to avoid unnecessarily broad permissions.
Per renovatebot/github-action#827, the Renovate Docker container runs as uid 12021, not 1000. Also add sudo since the runner user may not own /tmp/renovate after cache restore.
erezrokah
commented
Mar 18, 2026
| key: renovate-cache-${{ env.RENOVATE_VERSION }}-${{ github.run_id }} | ||
| restore-keys: | | ||
| renovate-cache-${{ env.RENOVATE_VERSION }}- | ||
| - name: Fix cache permissions |
Member
Author
There was a problem hiding this comment.
- Cache the specific repository cache dir /tmp/renovate/cache/renovate/repository - Use sudo chown -R 12021:0 to match Renovate container uid (per official docs) - Remove RENOVATE_CACHE_DIR override to avoid permission issues (per README warning) See https://github.com/renovatebot/github-action#persisting-the-repository-cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RENOVATE_CACHE_DIR=/tmp/renovate/cacheto override the action's auto-detected path (/home/runner/work/...) which doesn't exist inside the Docker containerFixes the
EACCES: permission deniederrors introduced by #509.Test plan
EACCESerrors"cacheDir": "/tmp/renovate/cache"