feat: add venv-path input for activate-environment

Allow customizing the venv location while preserving working-directory semantics via --directory.
This commit is contained in:
Kevin Stillhammer 2026-02-03 14:41:13 +01:00
parent 98e1309028
commit 4b51b416f8
No known key found for this signature in database
9 changed files with 151 additions and 15 deletions

View file

@ -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.