Skip to content

Commit 2baff41

Browse files
committed
ci: install pathspec into a venv on the runner
System Python on ubuntu-latest is PEP 668 externally-managed, so the bare `pip install pathspec` failed the new CODEOWNERS-request step with `externally-managed-environment`. Create a venv under /tmp and install into it instead. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
1 parent dead229 commit 2baff41

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/github-actions-on-label-create.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ jobs:
9797
UPSTREAM: ${{ env.UPSTREAM_OWNER }}/${{ env.UPSTREAM_REPO }}
9898
run: |
9999
set -euo pipefail
100-
python3 -m pip install --quiet pathspec
101-
python3 <<'PY'
100+
# System Python on the runner is PEP 668 externally-managed; use a venv.
101+
python3 -m venv /tmp/codeowners-venv
102+
/tmp/codeowners-venv/bin/pip install --quiet pathspec
103+
/tmp/codeowners-venv/bin/python <<'PY'
102104
import base64, json, os, subprocess, sys
103105
from pathspec import GitIgnoreSpec
104106

0 commit comments

Comments
 (0)