diff --git a/README.md b/README.md index 1380415..c450461 100644 --- a/README.md +++ b/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. diff --git a/action.yml b/action.yml index 2a383f3..45b7690 100644 --- a/action.yml +++ b/action.yml @@ -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