fix: Gitea dogfood — Node without setup-node mirror + PyYAML venv #2
No files matched your search
+3
-10
@@ -48,21 +48,14 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
# Gitea forges often lack an actions/setup-node mirror (clone → 404).
|
# Do not uses: actions/setup-node — many Gitea forges have no mirror (404).
|
||||||
# Prefer runner-provided Node; only call setup-node when the mirror exists.
|
# Runner image / consumer workflow must provide Node >= 18.
|
||||||
- name: Setup Node (optional mirror)
|
|
||||||
id: setup_node
|
|
||||||
continue-on-error: true
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "20"
|
|
||||||
|
|
||||||
- name: Require Node.js
|
- name: Require Node.js
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if ! command -v node >/dev/null 2>&1; then
|
if ! command -v node >/dev/null 2>&1; then
|
||||||
echo "::error::Node.js >= 18 required for Gatekeep (merge-findings.js / publish.js)."
|
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: ./."
|
echo "Preinstall Node on the runner, or add a mirrored setup-node step before uses: ./."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
node --version
|
node --version
|
||||||
|
|||||||
+8
-5
@@ -176,11 +176,14 @@ set -e
|
|||||||
|
|
||||||
META=$(cat "$OUT/merge-meta.json")
|
META=$(cat "$OUT/merge-meta.json")
|
||||||
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
|
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
|
||||||
python3 -c 'import json,os,sys
|
python3 - "$META" <<'PY'
|
||||||
m=json.loads(sys.argv[1])
|
import json, os, sys
|
||||||
open(os.environ["GITHUB_OUTPUT"],"a").write(
|
m = json.loads(sys.argv[1])
|
||||||
f"risk_tier={m[\"risk_tier\"]}\nsecurity_blocking={str(m[\"security_blocking\"]).lower()}\nagreed_count={m[\"agreed_count\"]}\n"
|
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
|
||||||
)' "$META"
|
fh.write(f"risk_tier={m['risk_tier']}\n")
|
||||||
|
fh.write(f"security_blocking={str(m['security_blocking']).lower()}\n")
|
||||||
|
fh.write(f"agreed_count={m['agreed_count']}\n")
|
||||||
|
PY
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit "$pub_ec"
|
exit "$pub_ec"
|
||||||
Reference in new issue
Block a user