Skip to content

Commit 47a594c

Browse files
committed
Make reusable Python workflow dispatchable
Rename reusable workflow and add workflow_dispatch so the reusable workflow can be run manually with a Python version choice. Update PYTHON_VERSION env to read from either workflow_call inputs or workflow_dispatch event inputs. Remove duplicate workflow_dispatch inputs and the conditional in build-python.yml so the matrix always invokes the reusable workflow for each version (3.12.12, 3.13.12, 3.14.3). This simplifies manual runs and centralizes version handling in the reusable workflow.
1 parent b83e652 commit 47a594c

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.github/workflows/build-python-version.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Python Packages (Reusable)
1+
name: Build Python Version
22

33
on:
44
workflow_call:
@@ -7,9 +7,19 @@ on:
77
description: Full Python version (e.g. 3.13.12)
88
required: true
99
type: string
10+
workflow_dispatch:
11+
inputs:
12+
python_version:
13+
description: Full Python version (e.g. 3.13.12)
14+
required: true
15+
type: choice
16+
options:
17+
- 3.12.12
18+
- 3.13.12
19+
- 3.14.3
1020

1121
env:
12-
PYTHON_VERSION: ${{ inputs.python_version }}
22+
PYTHON_VERSION: ${{ inputs.python_version || github.event.inputs.python_version }}
1323
PYTHON_DIST_RELEASE: 20260203 # https://github.com/astral-sh/python-build-standalone/releases
1424

1525
jobs:

.github/workflows/build-python.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ on:
55
branches:
66
- '**'
77
workflow_dispatch:
8-
inputs:
9-
python_version:
10-
description: 'Version to build (all, 3.12.12, 3.13.12, 3.14.3)'
11-
required: true
12-
default: all
13-
type: choice
14-
options:
15-
- all
16-
- 3.12.12
17-
- 3.13.12
18-
- 3.14.3
198

209
jobs:
2110
build-matrix:
@@ -27,7 +16,6 @@ jobs:
2716
- 3.12.12
2817
- 3.13.12
2918
- 3.14.3
30-
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.python_version == 'all' || github.event.inputs.python_version == matrix.python_version }}
3119
uses: ./.github/workflows/build-python-version.yml
3220
with:
3321
python_version: ${{ matrix.python_version }}

0 commit comments

Comments
 (0)