diff --git a/.gitea/workflows/code-review.yml b/.gitea/workflows/code-review.yml index 07daa8bd5..9c691adba 100644 --- a/.gitea/workflows/code-review.yml +++ b/.gitea/workflows/code-review.yml @@ -28,6 +28,14 @@ jobs: - name: Install dependencies run: | + # 确保 python3-pip 可用(兼容不同基础镜像) + if ! python3 -m pip --version >/dev/null 2>&1; then + apt-get update -qq && apt-get install -y -qq python3-pip python3-venv >/dev/null 2>&1 + fi + # 部分镜像 ensurepip 方式兜底 + if ! python3 -m pip --version >/dev/null 2>&1; then + python3 -m ensurepip --upgrade 2>/dev/null || curl -sS https://bootstrap.pypa.io/get-pip.py | python3 + fi python3 -m pip install --upgrade pip python3 -m pip install requests