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