fix: use python3 -m pip and update PATH for PyYAML
This commit is contained in:
parent
14237db9d7
commit
266836cabd
|
|
@ -14,15 +14,14 @@ jobs:
|
||||||
- name: Install Node.js and Python deps
|
- name: Install Node.js and Python deps
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
# We avoid apt-get update/install for tools already in the image or easily fetched
|
# Use python3 -m pip to ensure we use the python3 installed in the image
|
||||||
# Python3 and curl are already in golang:1.23-bullseye.
|
python3 -m pip install --user PyYAML
|
||||||
# We only need python3-yaml and nodejs.
|
|
||||||
# To avoid broken debian-security mirrors, we use pip for yaml and binary for node.
|
|
||||||
|
|
||||||
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 -
|
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
|
- name: Check out repository
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
@ -30,6 +29,8 @@ jobs:
|
||||||
- name: Validate repository
|
- name: Validate repository
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
# Ensure user pip path is available for the script
|
||||||
|
export PATH="${PATH}:${HOME}/.local/bin"
|
||||||
./jeannie validate
|
./jeannie validate
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
|
@ -42,9 +43,10 @@ jobs:
|
||||||
- name: Install Node.js and Python deps
|
- name: Install Node.js and Python deps
|
||||||
run: |
|
run: |
|
||||||
set -e
|
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 -
|
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
|
- name: Check out repository
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
@ -52,6 +54,7 @@ jobs:
|
||||||
- name: Block automatic deploy for external Gitea changes
|
- name: Block automatic deploy for external Gitea changes
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
export PATH="${PATH}:${HOME}/.local/bin"
|
||||||
|
|
||||||
event_before="$(
|
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 "")'
|
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 "")'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue