Fail when cache local path does not exist when trying to cache (#163)

Can be disabled by setting `ignore-nothing-to-cache: true`
This commit is contained in:
Kevin Stillhammer 2024-11-23 16:30:54 +01:00 committed by GitHub
parent 691a091485
commit ed171c292b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 103 additions and 44 deletions

View file

@ -18,6 +18,8 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
- [Enable Caching](#enable-caching)
- [Cache dependency glob](#cache-dependency-glob)
- [Local cache path](#local-cache-path)
- [Disable cache pruning](#disable-cache-pruning)
- [Ignore nothing to cache](#ignore-nothing-to-cache)
- [GitHub authentication token](#github-authentication-token)
- [UV_TOOL_DIR](#uv_tool_dir)
- [UV_TOOL_BIN_DIR](#uv_tool_bin_dir)
@ -195,6 +197,19 @@ input.
prune-cache: false
```
### Ignore nothing to cache
By default, the action will fail if there is nothing to cache. If you want to ignore this, set the
`ignore-nothing-to-cache` input to `true`.
```yaml
- name: Ignore nothing to cache
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
ignore-nothing-to-cache: true
```
### GitHub authentication token
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API