From 480c4bca52fcfa76a3d9e748ebf717d985191873 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 24 Apr 2026 12:24:35 -0300 Subject: [PATCH] Fix Python setup in Gitea Actions workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The oci-mcp-runner uses node:20-bookworm which runs as root and does NOT ship with sudo installed. Our workflows used 'sudo apt-get' → step failed with 'sudo: command not found' (exit 127) on first invocation of sku-catalog-refresh.yaml. Fix both affected workflows (sku-catalog-refresh + kb-health): - Drop the `sudo` prefix (we're already root). - Install Python deps via apt packages (python3-requests, python3-yaml, python3-bs4) instead of pip. Avoids PEP 668 / externally-managed environment error on Debian 12 and is faster/cacheable by the runner. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/kb-health.yaml | 7 ++----- .gitea/workflows/sku-catalog-refresh.yaml | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/kb-health.yaml b/.gitea/workflows/kb-health.yaml index 8f7674f..6af13f8 100644 --- a/.gitea/workflows/kb-health.yaml +++ b/.gitea/workflows/kb-health.yaml @@ -19,13 +19,10 @@ jobs: - name: Setup Python run: | - sudo apt-get update -qq - sudo apt-get install -y python3 python3-pip + apt-get update -qq + apt-get install -y --no-install-recommends python3 python3-requests python3-bs4 python3-yaml python3 --version - - name: Install dependencies - run: python3 -m pip install --user requests beautifulsoup4 pyyaml - - name: Check Architecture Center links id: check continue-on-error: true diff --git a/.gitea/workflows/sku-catalog-refresh.yaml b/.gitea/workflows/sku-catalog-refresh.yaml index 4e191fa..514ac8f 100644 --- a/.gitea/workflows/sku-catalog-refresh.yaml +++ b/.gitea/workflows/sku-catalog-refresh.yaml @@ -41,9 +41,9 @@ jobs: - name: Setup Python run: | - sudo apt-get update -qq - sudo apt-get install -y python3 python3-pip jq - python3 -m pip install --user requests pyyaml + apt-get update -qq + apt-get install -y --no-install-recommends python3 python3-requests python3-yaml jq + python3 --version - name: Refresh prices from Oracle API id: refresh