Skip to content

Commit

Permalink
Automatically prune the cache (#9)
Browse files Browse the repository at this point in the history
* Automatically prune the cache

* Hard-pin third-party action

* Remove warning
  • Loading branch information
hynek authored Jul 26, 2024
1 parent 0e7ec7c commit ccac8fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit ccac8fc

Please sign in to comment.