From 9955e046cdce485d8b8c82647cfdbb537a4f797c Mon Sep 17 00:00:00 2001 From: master3395 Date: Sun, 15 Feb 2026 04:06:21 +0100 Subject: [PATCH] CI: use venv in Docker validate for reliable Python/requests --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dcafbe73..ad8f79f2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,7 @@ jobs: echo "=== Installing deps (apt or yum/dnf) ===" if command -v apt-get >/dev/null 2>&1; then apt-get update -qq - apt-get install -y -qq python3 python3-pip >/dev/null + apt-get install -y -qq python3 python3-pip python3-venv >/dev/null pip3 install -q requests 2>/dev/null || pip3 install -q --break-system-packages requests 2>/dev/null || true else if [ "$IMAGE" = "centos:7" ]; then @@ -140,7 +140,12 @@ jobs: done test -f preUpgrade.sh && test -f cyberpanel_upgrade.sh || { echo "Missing required scripts"; exit 1; } echo "=== Python version fetcher ===" - PYTHONPATH=. python3 -c " + PYEXE=python3 + if python3 -m venv /tmp/venv 2>/dev/null; then + /tmp/venv/bin/pip install -q requests 2>/dev/null + PYEXE=/tmp/venv/bin/python + fi + PYTHONPATH=. $PYEXE -c " from plogical.versionFetcher import get_latest_phpmyadmin_version, get_latest_snappymail_version pma = get_latest_phpmyadmin_version() snappy = get_latest_snappymail_version()