From 52c41ca8fbe637c60eabefaf1d459fea84a5fb53 Mon Sep 17 00:00:00 2001 From: Mumuni Date: Fri, 25 Sep 2026 19:39:36 +0000 Subject: [PATCH] =?UTF-8?q?fix(ci):=20install=20python3=20via=20apk=20?= =?UTF-8?q?=E2=80=94=20act=20job=20container=20is=20alpine,=20not=20debian?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run 467 log (job 1985): 'python3 missing — installing on alpine' then 'apt-get: command not found' → exit 127. The act_runner container is node:20-alpine-ish; the provisioning step now detects apk first, apt second, and fails loudly with a diagnostic if neither exists. --- .gitea/workflows/ci.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e7ed8f3..6acb383 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -15,17 +15,25 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Ensure python3 available (runner image may lack it) + - name: Ensure python3 + PyYAML (act container is alpine-based, no python preinstalled) run: | + . /etc/os-release + echo "job OS: $ID" if command -v python3 >/dev/null 2>&1; then python3 --version - else - . /etc/os-release - echo "python3 missing — installing on $ID $VERSION_CODENAME" + elif command -v apk >/dev/null 2>&1; then + echo "installing via apk" + apk add --no-cache python3 py3-yaml + python3 --version + python3 -c "import yaml" || { echo "yaml import failed after py3-yaml; trying pip"; python3 -m pip install --break-system-packages pyyaml; } + elif command -v apt-get >/dev/null 2>&1; then + echo "installing via apt" apt-get update -qq apt-get install -y -qq python3 python3-yaml python3 --version - python3 -c "import yaml" && echo "PyYAML OK" + else + echo "no python3 and no apk/apt in job image — cannot run CI checks" + exit 1 fi - run: node --version