mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-04-05 23:25:19 -04:00
Set the cache-dependency-glob default to **/uv.lock
This mirrors the default behavior for setup-python
This commit is contained in:
parent
bc9d07a36a
commit
9be1dd9b54
2 changed files with 12 additions and 9 deletions
17
README.md
17
README.md
|
@ -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
|
||||
changes. The glob matches files relative to the repository root.
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
uses: astral-sh/setup-uv@v2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "uv.lock"
|
||||
```
|
||||
> [!NOTE]
|
||||
> The default is `**/uv.lock`.
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
|
@ -127,6 +122,14 @@ changes. The glob matches files relative to the repository root.
|
|||
**pyproject.toml
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Never invalidate the cache
|
||||
uses: astral-sh/setup-uv@v2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: ""
|
||||
```
|
||||
|
||||
### Local cache path
|
||||
|
||||
This action controls where `uv` stores its cache on the runner's filesystem.
|
||||
|
|
|
@ -20,8 +20,8 @@ inputs:
|
|||
cache-dependency-glob:
|
||||
description:
|
||||
'Glob pattern to match files relative to the repository root to control
|
||||
the cache. e.g. "uv.lock"'
|
||||
required: false
|
||||
the cache.'
|
||||
default: "**/uv.lock"
|
||||
cache-suffix:
|
||||
description: "Suffix for the cache key"
|
||||
required: false
|
||||
|
|
Loading…
Add table
Reference in a new issue