Skip to content
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

Automatically prune the cache #9

Merged
merged 3 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
- run: uv ...
```

Once you're done installing packages with *uv*, we recommend running `uv cache prune --ci` to shrink the cache to downloaded files, otherwise it can get very big and cache restoration becomes slow.


## Cache Management

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ runs:
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}${{ inputs.cache-suffix }}${{ env.HASH_CACHE_SUFFIX }}

- name: Schedule cache pruning
uses: gacts/run-and-post-run@4683764dd706df847f57b9bed39d08164bcd2690
if: inputs.use-cache-if == 'true'
with:
post: uv cache prune --ci