Skip to content

Use relative path in cache key#907

Open
ntkme wants to merge 1 commit intomasterfrom
relative-path-in-cache-key
Open

Use relative path in cache key#907
ntkme wants to merge 1 commit intomasterfrom
relative-path-in-cache-key

Conversation

@ntkme
Copy link
Copy Markdown
Collaborator

@ntkme ntkme commented Apr 21, 2026

This is an alternative solution to the issue described in #904 and #905.

The problem statement is that when use aws codebuild as self-hosted runner, the $GITHUB_WORKSPACE would change on every single build, and currently the cache key contains process.cwd(), thus it will always invalidate the cache.

The solution in this PR is to use a relative cwd computed from $GITHUB_WORKSPACE instead of the absolute cwd, so that it works consistently on github runner and other runners.

Note: This change will break all caches on all repositories once when updating to this version due to updating the cache key, but after that cache should work again.

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.

Bundler cache not working due to ephemeral workdir

1 participant