mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-01-19 16:28:18 +08:00
8d65000ec9
We should aim for a solution with sane defaults that work as most users would expect it. The current default leads to a cache that is never invalidated and thus never updated. This also mirrors the default behaviors for setup-python which use `**/requirements.txt`, `**/Pipfile.lock` or `**/poetry.lock` Also make it clear that the uv cache on the filesystem can be uploaded to the GitHub Actions cache, but they are distinct things. Also make it clear that the local cache path can be changed without using `enable-cache: true`
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: "Python setup uv"
|
|
description: "Set up your GitHub Actions workflow with a specific version of uv"
|
|
author: "eifinger"
|
|
inputs:
|
|
version:
|
|
description: "The version of uv to install"
|
|
default: "latest"
|
|
checksum:
|
|
description: "The checksum of the uv version to install"
|
|
required: false
|
|
github-token:
|
|
description:
|
|
"Used to increase the rate limit when retrieving versions and downloading
|
|
uv."
|
|
required: false
|
|
default: ${{ github.token }}
|
|
enable-cache:
|
|
description: "Enable caching of the uv cache"
|
|
default: "false"
|
|
cache-dependency-glob:
|
|
description:
|
|
'Glob pattern to match files relative to the repository root to control
|
|
the cache.'
|
|
default: "**/uv.lock"
|
|
cache-suffix:
|
|
description: "Suffix for the cache key"
|
|
required: false
|
|
cache-local-path:
|
|
description: "Local path to store the cache."
|
|
default: ""
|
|
outputs:
|
|
uv-version:
|
|
description: "The installed uv version. Useful when using latest."
|
|
cache-hit:
|
|
description: "A boolean value to indicate a cache entry was found"
|
|
runs:
|
|
using: "node20"
|
|
main: "dist/setup/index.js"
|
|
post: "dist/save-cache/index.js"
|
|
post-if: success()
|
|
branding:
|
|
icon: "package"
|
|
color: "blue"
|