Set the cache-dependency-glob default to **/uv.lock

This mirrors the default behavior for setup-python
This commit is contained in:
Kevin Stillhammer 2024-09-16 15:34:30 +02:00
parent bc9d07a36a
commit 9be1dd9b54
No known key found for this signature in database
2 changed files with 12 additions and 9 deletions

View file

@ -101,13 +101,8 @@ If you want to control when the cache is invalidated, specify a glob pattern wit
`cache-dependency-glob` input. The cache will be invalidated if any file matching the glob pattern `cache-dependency-glob` input. The cache will be invalidated if any file matching the glob pattern
changes. The glob matches files relative to the repository root. changes. The glob matches files relative to the repository root.
```yaml > [!NOTE]
- name: Define a cache dependency glob > The default is `**/uv.lock`.
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
```
```yaml ```yaml
- name: Define a cache dependency glob - name: Define a cache dependency glob
@ -127,6 +122,14 @@ changes. The glob matches files relative to the repository root.
**pyproject.toml **pyproject.toml
``` ```
```yaml
- name: Never invalidate the cache
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: ""
```
### Local cache path ### Local cache path
This action controls where `uv` stores its cache on the runner's filesystem. This action controls where `uv` stores its cache on the runner's filesystem.

View file

@ -20,8 +20,8 @@ inputs:
cache-dependency-glob: cache-dependency-glob:
description: description:
'Glob pattern to match files relative to the repository root to control 'Glob pattern to match files relative to the repository root to control
the cache. e.g. "uv.lock"' the cache.'
required: false default: "**/uv.lock"
cache-suffix: cache-suffix:
description: "Suffix for the cache key" description: "Suffix for the cache key"
required: false required: false