Skip to content

Commit 2f86f4e

Browse files
Copilotm-aciek
andcommitted
Pin Python version for 3.10 docs generation to Python 3.12
Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/3105de3a-da49-4857-92a8-751f23be01e7 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
1 parent 5b558b8 commit 2f86f4e

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
description: 'Publish to GitHub Pages'
1919
required: false
2020
default: false
21+
python_version:
22+
description: 'Python version used to generate docs'
23+
required: false
24+
default: '3'
2125
workflow_call:
2226
inputs:
2327
reference:
@@ -36,6 +40,10 @@ on:
3640
description: 'Publish to GitHub Pages'
3741
default: 'false'
3842
type: string
43+
python_version:
44+
description: 'Python version used to generate docs'
45+
default: '3'
46+
type: string
3947
permissions:
4048
contents: write
4149
jobs:
@@ -44,7 +52,7 @@ jobs:
4452
steps:
4553
- uses: actions/setup-python@master
4654
with:
47-
python-version: 3
55+
python-version: ${{ inputs.python_version }}
4856
- uses: actions/checkout@master
4957
with:
5058
repository: ${{ inputs.repository }}
@@ -70,7 +78,7 @@ jobs:
7078
steps:
7179
- uses: actions/setup-python@master
7280
with:
73-
python-version: 3
81+
python-version: ${{ inputs.python_version }}
7482
- uses: actions/checkout@master
7583
with:
7684
repository: ${{ inputs.repository }}
@@ -96,7 +104,7 @@ jobs:
96104
steps:
97105
- uses: actions/setup-python@master
98106
with:
99-
python-version: 3
107+
python-version: ${{ inputs.python_version }}
100108
- uses: actions/checkout@master
101109
with:
102110
repository: ${{ inputs.repository }}
@@ -123,7 +131,7 @@ jobs:
123131
steps:
124132
- uses: actions/setup-python@master
125133
with:
126-
python-version: 3
134+
python-version: ${{ inputs.python_version }}
127135
- uses: actions/checkout@master
128136
with:
129137
repository: ${{ inputs.repository }}
@@ -143,7 +151,7 @@ jobs:
143151
steps:
144152
- uses: actions/setup-python@master
145153
with:
146-
python-version: 3
154+
python-version: ${{ inputs.python_version }}
147155
- uses: actions/checkout@master
148156
with:
149157
repository: ${{ inputs.repository }}

.github/workflows/schedule.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
id: get-versions
1717
run: |
1818
versions=$(curl -sf https://peps.python.org/api/release-cycle.json | \
19-
jq -c '[to_entries[] | select(.value.status != "end-of-life") | {version: .key, branch: (.value.branch // .key)}]')
19+
jq -c '[to_entries[] | select(.value.status != "end-of-life") | {version: .key, branch: (.value.branch // .key), python_version: (if .key == "3.10" then "3.12" else "3" end)}]')
2020
echo "versions=$versions" >> "$GITHUB_OUTPUT"
2121
build:
2222
needs: get-versions
@@ -28,4 +28,5 @@ jobs:
2828
with:
2929
reference: ${{ matrix.branch }}
3030
dist_version: ${{ matrix.version }}
31+
python_version: ${{ matrix.python_version }}
3132
publish: ${{ 'true' }}

0 commit comments

Comments
 (0)