fix: Gitea dogfood — Node without setup-node mirror + PyYAML venv #2
+27
-3
@@ -48,16 +48,40 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Node (stdlib only)
|
# Gitea forges often lack an actions/setup-node mirror (clone → 404).
|
||||||
|
# Prefer runner-provided Node; only call setup-node when the mirror exists.
|
||||||
|
- name: Setup Node (optional mirror)
|
||||||
|
id: setup_node
|
||||||
|
continue-on-error: true
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
|
|
||||||
|
- name: Require Node.js
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if ! command -v node >/dev/null 2>&1; then
|
||||||
|
echo "::error::Node.js >= 18 required for Gatekeep (merge-findings.js / publish.js)."
|
||||||
|
echo "Mirror actions/setup-node on this forge, preinstall Node on the runner, or add setup-node before uses: ./."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
node --version
|
||||||
|
|
||||||
|
# PEP 668 blocks pip --user on many runners; use a workspace venv instead.
|
||||||
- name: Install PyYAML (providers.yaml)
|
- name: Install PyYAML (providers.yaml)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --user pyyaml -q
|
if python3 -c "import yaml" 2>/dev/null; then
|
||||||
python3 -c "import yaml; print('pyyaml ok', yaml.__version__)"
|
python3 -c "import yaml; print('pyyaml ok', yaml.__version__)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
VENV="${{ github.workspace }}/.gatekeep/.venv"
|
||||||
|
mkdir -p "$(dirname "$VENV")"
|
||||||
|
python3 -m venv "$VENV"
|
||||||
|
"$VENV/bin/pip" install -q pyyaml
|
||||||
|
echo "$VENV/bin" >> "$GITHUB_PATH"
|
||||||
|
echo "VIRTUAL_ENV=$VENV" >> "$GITHUB_ENV"
|
||||||
|
"$VENV/bin/python" -c "import yaml; print('pyyaml ok', yaml.__version__)"
|
||||||
|
|
||||||
- name: Discover entry points
|
- name: Discover entry points
|
||||||
id: discover
|
id: discover
|
||||||
|
|||||||
Reference in new issue
Block a user