Skip to content

Commit fed4f79

Browse files
ci(.github/workflows): use the runner's system Python 3.11 (peco-driver) (#539)
## Problem After moving the bot workflows to the self-hosted **peco-driver** runner (#538), `actions/setup-python` fails there: > Version 3.11 was not found in the local cache … not found for this operating system. Self-hosted runners have no GitHub tool-cache (that's why setup-python "just worked" on `ubuntu-latest`), and this one can't reach the version manifest. ## Fix The runner is provisioned with system **python3.11** + **Node**. All four bot workflows drop `actions/setup-python` and instead build a venv from the runner's `python3.11`, put on `$GITHUB_PATH` so later `pip` / `python -m …` steps resolve to 3.11 unchanged. Node (for `@anthropic-ai/claude-code`, which the Python SDK shells out to) comes from the runner. Followup workflows keep their `if: skip != 'true'` guard. YAML validated; title checked against adbc's checker. ## Requires (runner provisioning, one-time) `python3.11` + `python3.11-venv` and Node/npm installed on the peco-driver runner and on the runner service's PATH. This pull request and its description were written by Isaac.
1 parent 2e3e239 commit fed4f79

4 files changed

Lines changed: 32 additions & 12 deletions

File tree

.github/workflows/engineer-bot-followup.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,14 @@ jobs:
178178
179179
- name: Setup Python
180180
if: steps.filter.outputs.skip != 'true'
181-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
182-
with:
183-
python-version: '3.11'
181+
shell: bash
182+
# actions/setup-python can't provision on this self-hosted runner
183+
# (no hosted tool-cache). The runner is provisioned with system
184+
# python3.11; use it via a venv so pip installs stay isolated and
185+
# `pip` / `python -m` resolve to 3.11 for the later steps.
186+
run: |
187+
python3.11 -m venv "$RUNNER_TEMP/bot-venv"
188+
echo "$RUNNER_TEMP/bot-venv/bin" >> "$GITHUB_PATH"
184189
185190
- name: Setup .NET
186191
if: steps.filter.outputs.skip != 'true'

.github/workflows/engineer-bot.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,14 @@ jobs:
109109
git config user.email "${bot_id}+${bot_login}@users.noreply.github.com"
110110
111111
- name: Setup Python
112-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
113-
with:
114-
python-version: '3.11'
112+
shell: bash
113+
# actions/setup-python can't provision on this self-hosted runner
114+
# (no hosted tool-cache). The runner is provisioned with system
115+
# python3.11; use it via a venv so pip installs stay isolated and
116+
# `pip` / `python -m` resolve to 3.11 for the later steps.
117+
run: |
118+
python3.11 -m venv "$RUNNER_TEMP/bot-venv"
119+
echo "$RUNNER_TEMP/bot-venv/bin" >> "$GITHUB_PATH"
115120
116121
- name: Setup .NET
117122
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1

.github/workflows/reviewer-bot-followup.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,14 @@ jobs:
157157

158158
- name: Setup Python
159159
if: steps.filter.outputs.skip != 'true'
160-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
161-
with:
162-
python-version: '3.11'
160+
shell: bash
161+
# actions/setup-python can't provision on this self-hosted runner
162+
# (no hosted tool-cache). The runner is provisioned with system
163+
# python3.11; use it via a venv so pip installs stay isolated and
164+
# `pip` / `python -m` resolve to 3.11 for the later steps.
165+
run: |
166+
python3.11 -m venv "$RUNNER_TEMP/bot-venv"
167+
echo "$RUNNER_TEMP/bot-venv/bin" >> "$GITHUB_PATH"
163168
164169
- name: Install bot engine (interim PAT git-install) + Claude SDK/CLI
165170
if: steps.filter.outputs.skip != 'true'

.github/workflows/reviewer-bot.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,14 @@ jobs:
8989
persist-credentials: false
9090

9191
- name: Setup Python
92-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
93-
with:
94-
python-version: '3.11'
92+
shell: bash
93+
# actions/setup-python can't provision on this self-hosted runner
94+
# (no hosted tool-cache). The runner is provisioned with system
95+
# python3.11; use it via a venv so pip installs stay isolated and
96+
# `pip` / `python -m` resolve to 3.11 for the later steps.
97+
run: |
98+
python3.11 -m venv "$RUNNER_TEMP/bot-venv"
99+
echo "$RUNNER_TEMP/bot-venv/bin" >> "$GITHUB_PATH"
95100
96101
- name: Install bot engine (interim PAT git-install) + Claude SDK/CLI
97102
env:

0 commit comments

Comments
 (0)