


















@@ -883,6 +883,54 @@ jobs:
883883 } >> "$GITHUB_STEP_SUMMARY"
884884 }
885885886+ summarize_failed_child() {
887+ local label="$1"
888+ local run_id="$2"
889+ if [[ -z "${run_id// }" ]]; then
890+ return 0
891+ fi
892+893+ local run_json status conclusion artifacts_json
894+ run_json="$(gh run view "$run_id" --json status,conclusion,url,jobs)"
895+ status="$(jq -r '.status' <<< "$run_json")"
896+ conclusion="$(jq -r '.conclusion' <<< "$run_json")"
897+ if [[ "$status" == "completed" && "$conclusion" == "success" ]]; then
898+ return 0
899+ fi
900+901+ {
902+ echo
903+ echo "### Failed child detail: ${label}"
904+ echo
905+ jq -r '
906+ "- Run: " + (.url // ""),
907+ "- Result: `" + (.status // "") + "/" + (.conclusion // "") + "`",
908+ "",
909+ "Failed jobs:",
910+ (.jobs[]
911+ | select(.conclusion != "success" and .conclusion != "skipped")
912+ | "- `" + (.name | gsub("`"; "\\`")) + "`: `" + ((.conclusion // .status // "") | tostring) + "` " + (.url // ""))
913+ ' <<< "$run_json" || true
914+ echo
915+ echo "Artifacts:"
916+ artifacts_json="$(
917+ gh api "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/artifacts?per_page=100" 2>/dev/null || true
918+ )"
919+ if [[ -n "${artifacts_json// }" ]]; then
920+ jq -r '
921+ if ((.artifacts // []) | length) == 0 then
922+ "- none"
923+ else
924+ (.artifacts[]
925+ | "- `" + (.name | gsub("`"; "\\`")) + "` (" + ((.size_in_bytes // 0) | tostring) + " bytes)")
926+ end
927+ ' <<< "$artifacts_json" || echo "- unable to list artifacts"
928+ else
929+ echo "- unable to list artifacts"
930+ fi
931+ } >> "$GITHUB_STEP_SUMMARY"
932+ }
933+886934 failed=0
887935888936 append_child_overview
@@ -916,6 +964,13 @@ jobs:
916964 summarize_child_timing "release_checks" "$RELEASE_CHECKS_RUN_ID"
917965 summarize_child_timing "npm_telegram" "$NPM_TELEGRAM_RUN_ID"
918966967+ if [[ "$failed" != "0" ]]; then
968+ summarize_failed_child "normal_ci" "$NORMAL_CI_RUN_ID"
969+ summarize_failed_child "plugin_prerelease" "$PLUGIN_PRERELEASE_RUN_ID"
970+ summarize_failed_child "release_checks" "$RELEASE_CHECKS_RUN_ID"
971+ summarize_failed_child "npm_telegram" "$NPM_TELEGRAM_RUN_ID"
972+ fi
973+919974 exit "$failed"
920975921976 - name: Request private evidence update
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。