ci: temporary runner capability probe (NOT for merge) #36

Closed
mumuni-bot wants to merge 3 commits from ci/runner-probe into main
Showing only changes of commit a47aea3328 - Show all commits
+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