Files
setup-uv/action.yml
T

102 lines
3.4 KiB
YAML
Raw Normal View History

2024-09-17 23:20:15 -04:00
name: "astral-sh/setup-uv"
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:
version:
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
activate-environment:
description: "Use uv venv to activate a venv ready to be used by later steps. "
default: "false"
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:
description:
"Used to increase the rate limit when retrieving versions and downloading uv."
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:
description: "Enable uploading of the uv cache"
default: "auto"
2024-08-23 23:58:26 +02:00
cache-dependency-glob:
description:
"Glob pattern to match files relative to the working directory to control
2024-09-16 21:33:16 +02:00
the cache."
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
**/uv.lock
**/*.py.lock
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."
default: ""
prune-cache:
description: "Prune cache before saving."
default: "true"
2025-10-09 16:47:24 -04:00
cache-python:
description: "Upload managed Python installations to the Github Actions cache."
default: "false"
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:
description: "URL to the manifest file containing available versions and download URLs."
required: false
2025-08-12 22:33:00 +02:00
add-problem-matchers:
description: "Add problem matchers."
default: "true"
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"
venv:
description: "Path to the activated venv if activate-environment is true"
2024-08-23 23:58:26 +02:00
runs:
2025-10-07 08:44:57 +02:00
using: "node24"
2024-09-05 08:06:45 -04:00
main: "dist/setup/index.js"
post: "dist/save-cache/index.js"
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"