-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathaction.yml
More file actions
36 lines (34 loc) · 914 Bytes
/
action.yml
File metadata and controls
36 lines (34 loc) · 914 Bytes
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
name: Setup Python and uv
description: Set up Python, install uv, and optionally sync dependencies.
inputs:
python-version:
description: Python version to install.
required: false
default: "3.12"
sync-deps:
description: Whether to run dependency sync via uv.
required: false
default: "false"
sync-args:
description: Extra arguments passed to `uv sync`.
required: false
default: ""
runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version }}
- name: Install uv
shell: bash
run: |
set -euo pipefail
python -m pip install --upgrade pip
python -m pip install uv
- name: Sync dependencies
if: ${{ inputs.sync-deps == 'true' }}
shell: bash
run: |
set -euo pipefail
uv sync ${{ inputs.sync-args }}