-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide control over uv cache key #153
Comments
Lets assume the following layout (based on uv workspace docs):
If you want to work with the - name: Use the bird-feeder cache
id: setup-uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-suffix: "bird-feeder"
cache-dependency-glob: "**/bird-feeder/uv.lock" If you want to work with the - name: Use the seeder cache
id: setup-uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-suffix: "seeder"
cache-dependency-glob: "**/seeder/uv.lock" If you want a cache that gets invalidated when any of the two changes: - name: Invalidate the cache when either project changes
id: setup-uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**/uv.lock" It might be easier to maintain to just have a single cache for the whole monorepo and live with the fact that it might always contain dependency Based on the differences between the dependencies of your different projects it might be more efficient to use a different cache per project. Effiency here means that the cache is smaller and therefore faster/cheaper to download from the GitHub Actions cache when one of your workflow runs starts. |
@pvardanis feel free to reopen this if your question is not answered |
I work on a monorepo with multiple python projects each with its own
uv.lock
file. I want to be able to cache uv with a name that indicates the package name so I can be able to cache it only when needed, and also to avoid overwriting cached files that belong to different python projects. Currently it's not possible or am I missing something?The text was updated successfully, but these errors were encountered: