diff --git a/README.md b/README.md index 08bd130..264477d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yml b/action.yml index 6865798..fdce010 100644 --- a/action.yml +++ b/action.yml @@ -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