mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-03-06 01:16:48 +00:00
feat: add venv-path input for activate-environment (#746)
Allow customizing the venv location while preserving working-directory semantics via --directory. Supersedes: #736
This commit is contained in:
committed by
GitHub
parent
99b0f0474b
commit
3511ff7054
@@ -15,6 +15,17 @@ This allows directly using it in later steps:
|
||||
- run: uv pip install pip
|
||||
```
|
||||
|
||||
By default, the venv is created at `.venv` inside the `working-directory`.
|
||||
|
||||
You can customize the venv location with `venv-path`, for example to place it in the runner temp directory:
|
||||
|
||||
```yaml
|
||||
- uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
activate-environment: true
|
||||
venv-path: ${{ runner.temp }}/custom-venv
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
|
||||
|
||||
Reference in New Issue
Block a user