fix: use python3 -m pip and update PATH for PyYAML
Homelab Main / validate (push) Failing after 2s Details
Homelab Main / deploy (push) Has been skipped Details

This commit is contained in:
jv 2026-09-18 09:52:15 -05:00
parent 14237db9d7
commit 266836cabd
1 changed files with 11 additions and 8 deletions

View File

@ -14,15 +14,14 @@ jobs:
- name: Install Node.js and Python deps
run: |
set -e
# We avoid apt-get update/install for tools already in the image or easily fetched
# Python3 and curl are already in golang:1.23-bullseye.
# We only need python3-yaml and nodejs.
# To avoid broken debian-security mirrors, we use pip for yaml and binary for node.
# Use python3 -m pip to ensure we use the python3 installed in the image
python3 -m pip install --user PyYAML
pip3 install PyYAML
# Update PATH to include user pip installs
export PATH="${PATH}:${HOME}/.local/bin"
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y --no-install-recommends nodejs
apt-get update && apt-get install -y --no-install-recommends nodejs
- name: Check out repository
run: |
set -e
@ -30,6 +29,8 @@ jobs:
- name: Validate repository
run: |
set -e
# Ensure user pip path is available for the script
export PATH="${PATH}:${HOME}/.local/bin"
./jeannie validate
deploy:
@ -42,9 +43,10 @@ jobs:
- name: Install Node.js and Python deps
run: |
set -e
pip3 install PyYAML
python3 -m pip install --user PyYAML
export PATH="${PATH}:${HOME}/.local/bin"
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y --no-install-recommends nodejs
apt-get update && apt-get install -y --no-install-recommends nodejs
- name: Check out repository
run: |
set -e
@ -52,6 +54,7 @@ jobs:
- name: Block automatic deploy for external Gitea changes
run: |
set -e
export PATH="${PATH}:${HOME}/.local/bin"
event_before="$(
python3 -c 'import json, os; p = os.environ.get("GITHUB_EVENT_PATH", ""); print(json.load(open(p, encoding="utf-8")).get("before", "") if p and os.path.exists(p) else "")'