2024-09-17 23:20:15 -04:00
name : "astral-sh/setup-uv"
2024-09-18 07:23:29 +00:00
description :
"Set up your GitHub Actions workflow with a specific version of uv."
2024-09-17 23:20:15 -04:00
author : "astral-sh"
2024-08-23 23:58:26 +02:00
inputs :
2024-09-04 17:14:10 -04:00
version :
2025-01-13 15:24:25 +01:00
description : "The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'."
default : ""
2025-07-17 20:22:18 +02:00
version-file :
description : "Path to a file containing the version of uv to install. Defaults to searching for uv.toml and if not found pyproject.toml."
default : ""
2024-11-28 21:41:37 +01:00
python-version :
description : "The version of Python to set UV_PYTHON to"
required : false
2025-04-24 15:17:35 +02:00
activate-environment :
description : "Use uv venv to activate a venv ready to be used by later steps. "
default : "false"
2026-02-04 08:40:32 +01:00
venv-path :
description : "Custom path for the virtual environment when using activate-environment. Defaults to '.venv' in the working directory."
default : ""
2026-04-16 15:48:02 +02:00
no-project :
description : "Pass --no-project when creating the venv with activate-environment."
default : "false"
2025-04-24 15:17:35 +02:00
working-directory :
description : "The directory to execute all commands in and look for files such as pyproject.toml"
default : ${{ github.workspace }}
2024-08-23 23:58:26 +02:00
checksum :
2024-09-05 08:06:45 -04:00
description : "The checksum of the uv version to install"
2024-08-23 23:58:26 +02:00
required : false
github-token :
2024-09-04 17:14:10 -04:00
description :
2026-03-12 22:03:21 +01:00
"Used when downloading uv from GitHub releases."
2024-08-23 23:58:26 +02:00
required : false
2024-09-11 10:18:23 +02:00
default : ${{ github.token }}
2024-08-23 23:58:26 +02:00
enable-cache :
2025-01-13 15:24:25 +01:00
description : "Enable uploading of the uv cache"
2024-12-13 20:12:42 +01:00
default : "auto"
2024-08-23 23:58:26 +02:00
cache-dependency-glob :
2024-09-04 17:14:10 -04:00
description :
2025-11-04 15:38:32 +00:00
"Glob pattern to match files relative to the working directory to control
2024-09-16 21:33:16 +02:00
the cache."
2024-12-08 17:51:13 +01:00
default : |
2025-04-29 22:42:06 +02:00
**/*requirements*.txt
**/*requirements*.in
**/*constraints*.txt
**/*constraints*.in
2025-04-24 15:18:27 +02:00
**/pyproject.toml
2024-12-08 17:51:13 +01:00
**/uv.lock
2025-09-26 22:26:03 +12:00
**/*.py.lock
2025-09-14 14:55:08 +02:00
restore-cache :
description : "Whether to restore the cache if found."
default : "true"
save-cache :
description : "Whether to save the cache after the run."
default : "true"
2024-08-23 23:58:26 +02:00
cache-suffix :
2024-09-05 08:06:45 -04:00
description : "Suffix for the cache key"
2024-08-23 23:58:26 +02:00
required : false
cache-local-path :
2024-09-05 08:06:45 -04:00
description : "Local path to store the cache."
2024-09-07 14:11:25 +02:00
default : ""
2024-10-25 08:11:32 -04:00
prune-cache :
description : "Prune cache before saving."
2024-11-23 16:30:54 +01:00
default : "true"
2025-10-09 16:47:24 -04:00
cache-python :
description : "Upload managed Python installations to the Github Actions cache."
default : "false"
2024-11-23 16:30:54 +01:00
ignore-nothing-to-cache :
description : "Ignore when nothing is found to cache."
default : "false"
2025-03-16 22:15:17 +01:00
ignore-empty-workdir :
description : "Ignore when the working directory is empty."
default : "false"
2024-09-21 10:14:36 +02:00
tool-dir :
description : "Custom path to set UV_TOOL_DIR to."
required : false
tool-bin-dir :
description : "Custom path to set UV_TOOL_BIN_DIR to."
required : false
2025-06-18 22:33:20 +02:00
manifest-file :
2026-03-23 09:15:51 +01:00
description : "URL to a custom manifest file in the astral-sh/versions format."
2025-06-18 22:33:20 +02:00
required : false
2026-05-31 11:47:01 +02:00
download-from-astral-mirror :
description : "Download uv from the Astral mirror instead of directly from GitHub Releases."
default : "true"
2025-08-12 22:33:00 +02:00
add-problem-matchers :
description : "Add problem matchers."
default : "true"
2026-05-31 21:13:30 +02:00
quiet :
description : "Suppress info-level log output. Only warnings and errors are shown."
default : "false"
2025-10-11 21:02:04 +02:00
resolution-strategy :
description : "Resolution strategy to use when resolving version ranges. 'highest' uses the latest compatible version, 'lowest' uses the oldest compatible version."
default : "highest"
2024-08-23 23:58:26 +02:00
outputs :
uv-version :
2024-09-05 08:06:45 -04:00
description : "The installed uv version. Useful when using latest."
2025-03-21 13:44:23 +01:00
uv-path :
description : "The path to the installed uv binary."
uvx-path :
description : "The path to the installed uvx binary."
2024-08-23 23:58:26 +02:00
cache-hit :
2024-09-05 08:06:45 -04:00
description : "A boolean value to indicate a cache entry was found"
2025-12-13 17:25:42 +01:00
cache-key :
description : "The cache key used for storing/restoring the cache"
2025-10-11 15:17:25 +02:00
venv :
description : "Path to the activated venv if activate-environment is true"
2026-01-06 18:06:29 +01:00
python-version :
description : "The Python version that was set."
python-cache-hit :
description : "A boolean value to indicate the Python cache entry was found"
2024-08-23 23:58:26 +02:00
runs :
2025-10-07 08:44:57 +02:00
using : "node24"
2026-03-14 17:43:49 +01:00
main : "dist/setup/index.cjs"
post : "dist/save-cache/index.cjs"
2024-08-23 23:58:26 +02:00
post-if : success()
branding :
2024-09-05 08:06:45 -04:00
icon : "package"
2024-09-17 23:20:15 -04:00
color : "black"