diff --git a/.github/workflows/scripts/pve-run-script.sh b/.github/workflows/scripts/pve-run-script.sh index 95b733bc5..bc19d5259 100644 --- a/.github/workflows/scripts/pve-run-script.sh +++ b/.github/workflows/scripts/pve-run-script.sh @@ -739,22 +739,6 @@ run_update() { : >"$raw" token=$(head -c 16 /dev/urandom | od -An -tx1 | tr -d ' \n') echo "──────── $2 (live) ────────" - # Diagnosis (temporary): what GitHub answers the token for the two calls - # check_for_gh_release makes, from inside the guest. - if [[ "$PLATFORM" == "incus" ]]; then guest_cmd_probe=(incus exec "$ctid" --); else guest_cmd_probe=(pct exec "$ctid" --); fi - [[ -n "${GH_API_TOKEN:-}" ]] && "${guest_cmd_probe[@]}" env GITHUB_TOKEN="$GH_API_TOKEN" bash -s <<'PROBE' 2>&1 | sed 's/^/ probe: /' || true -for p in releases/latest 'releases?per_page=100'; do - for auth in yes no; do - h=(-H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28") - [[ $auth == yes ]] && h+=(-H "Authorization: Bearer $GITHUB_TOKEN") - code=$(curl -sSL -o /tmp/p.json -D /tmp/p.h -w '%{http_code}' --max-time 20 "${h[@]}" "https://api.github.com/repos/marimo-team/marimo/$p") - msg=$(jq -r 'if type=="object" then (.message // .tag_name) else "list of \(length)" end' /tmp/p.json 2>/dev/null | head -c 120) - rl=$(grep -i '^x-ratelimit-remaining' /tmp/p.h | tr -d '\r') - echo "$p auth=$auth -> $code $msg ($rl)" - done -done -rm -f /tmp/p.json /tmp/p.h -PROBE echo "::stop-commands::${token}" # timeout runs a program, not a shell function, so spell out the exec here. if [[ "$PLATFORM" == "incus" ]]; then guest_cmd=(incus exec "$ctid" --); else guest_cmd=(pct exec "$ctid" --); fi