Skip to content

Commit 7e56fa3

Browse files
committed
Add uv option as input
1 parent 03107c2 commit 7e56fa3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

setup/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@ inputs:
1111
- '3.11'
1212
- '3.12'
1313
default: '3.11'
14+
uv:
15+
type: boolean
16+
description: "Use uv to install python packages"
17+
default: true
1418

1519
runs:
1620
using: 'composite'
1721
steps:
22+
- name: Set up Python ${{ inputs.version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ inputs.version }}
26+
if: ${{ inputs.uv == 'true' }}
27+
1828
- name: Set up Python ${{ inputs.version }}
1929
uses: actions/setup-python@v4
2030
with:
@@ -23,14 +33,17 @@ runs:
2333
cache-dependency-path: |
2434
"**/pyproject.toml"
2535
"**/setup.py"
36+
if: ${{ inputs.uv != 'true' }}
2637

2738
- name: Install uv
2839
uses: astral-sh/setup-uv@v5
2940
with:
3041
enable-cache: true
3142
ignore-nothing-to-cache: true
3243
prune-cache: false
44+
if: ${{ inputs.uv == 'true' }}
3345

3446
- name: Setup uv to use system python without extra flags
3547
shell: bash
3648
run: echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV
49+
if: ${{ inputs.uv == 'true' }}

0 commit comments

Comments
 (0)