Merge pull request 'fix: Gitea dogfood — Node without setup-node mirror + PyYAML venv' (#2) from cursor/dogfood-runner-fixes-165a into main
Gatekeep evals / eval-floor (push) Successful in 1s
Gatekeep evals / eval-floor (push) Successful in 1s
This commit was merged in pull request #2.
This commit is contained in:
commit
a4fcfee1b3
2 files changed
+31
-11
No files matched your search
+23
-6
@@ -48,16 +48,33 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Node (stdlib only)
|
# Do not uses: actions/setup-node — many Gitea forges have no mirror (404).
|
||||||
uses: actions/setup-node@v4
|
# Runner image / consumer workflow must provide Node >= 18.
|
||||||
with:
|
- name: Require Node.js
|
||||||
node-version: "20"
|
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 "Preinstall Node on the runner, or add a mirrored setup-node step 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
|
||||||
|
|||||||
+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