ci: probe uses runner-injected GITHUB_* env instead of expression context
CI / validate (pull_request) Failing after 7s
Runner Probe / probe (pull_request) Successful in 4s

This commit is contained in:
Mumuni
2026-09-25 19:10:19 +00:00
parent 7720e0900f
commit a47aea3328
+4 -9
View File
@@ -18,15 +18,10 @@ jobs:
} > $RUNNER_TEMP/env.txt 2>&1 || { mkdir -p /tmp/rt && cp $RUNNER_TEMP/env.txt /tmp/rt/; }
exit 0
- name: report via PR comment
env:
PR_NUMBER: ${{ github.event.number }}
GIT_TOKEN: *** github.token }}
API_URL: ${{ github.api_url }}
REPO_NAME: ${{ github.repository }}
run: |
export BODY=$(cat $RUNNER_TEMP/env.txt || echo MISSING)
BODY=$(cat $RUNNER_TEMP/env.txt || echo MISSING)
PR=$(node -e "console.log(require(process.env.GITHUB_EVENT_PATH).number)")
node -e '
const t=process.env;
fetch(`${t.API_URL}/repos/${t.REPO_NAME}/issues/${t.PR_NUMBER}/comments`,{method:"POST",headers:{Authorization:`token ${t.GIT_TOKEN}`,"Content-Type":"application/json"},body:JSON.stringify({body:"```\n"+t.BODY+"\n```"})}).then(r=>console.log("comment POST:",r.status))' 2>&1
echo "BODY=$BODY"
const t=process.env, fs=require("fs");
fetch(t.GITHUB_API_URL+"/repos/"+t.GITHUB_REPOSITORY+"/issues/"+t.PR+"/comments",{method:"POST",headers:{Authorization:`token ${t.GITHUB_TOKEN}`,"Content-Type":"application/json"},body:JSON.stringify({body:"```\n"+t.BODY+"\n```"})}).then(r=>console.log("comment POST:",r.status))' PR=$PR 2>&1
shell: bash