-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
39 lines (35 loc) · 1.03 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Set up uv
description: Install uv and synchronize the environment with a given lock file.
inputs:
version:
description: 'uv version to install.'
required: false
default: '0.5.26'
python-version:
description: 'Python version to install.'
required: false
default: '3.13'
lockfile:
description: 'Packages to install.'
required: false
default: ''
only-binary:
description: 'Value to pass to the --only-binary option.'
required: false
default: ':all:'
runs:
using: "composite"
steps:
- name: Setup uv
uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
with:
version: ${{ inputs.version }}
enable-cache: false
- name: Install python version
if: ${{ inputs.python-version != '' }}
run: uv python install ${{ inputs.python-version }}
shell: bash
- name: Install packages
if: ${{ inputs.lockfile != '' }}
run: "uv pip sync ${{ inputs.lockfile }} --only-binary=${{ inputs.only-binary }} --system --reinstall"
shell: bash