mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-04-07 07:58:48 -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
|
`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.
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue