









@@ -479,7 +479,7 @@ jobs:
479479 local workflow="$1"
480480 shift
481481482- local before_json dispatch_output run_id status conclusion url poll_count
482+ local before_json dispatch_output run_id status conclusion url poll_count run_json
483483 before_json="$(gh run list --workflow "$workflow" --event workflow_dispatch --limit 100 --json databaseId --jq '[.[].databaseId]')"
484484485485 dispatch_output="$(gh workflow run "$workflow" --ref "$CHILD_WORKFLOW_REF" "$@" 2>&1)"
@@ -511,6 +511,46 @@ jobs:
511511 echo "Dispatched ${workflow}: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
512512 echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
513513514+ release_check_blocking_job() {
515+ case "$1" in
516+ "resolve_target" | \
517+ "Prepare release package artifact" | \
518+ "install_smoke_release_checks / "* | \
519+ "Run package acceptance" | \
520+ "Run package acceptance / "*)
521+ return 0
522+ ;;
523+ esac
524+ return 1
525+ }
526+527+ release_checks_advisory_only() {
528+ local run_json="$1"
529+ local verifier_conclusion name saw_advisory failed
530+531+ verifier_conclusion="$(
532+ jq -r '.jobs[] | select(.name == "Verify release checks") | .conclusion' <<< "$run_json" |
533+ tail -n 1
534+ )"
535+ if [[ "$verifier_conclusion" != "success" ]]; then
536+ return 1
537+ fi
538+539+ saw_advisory=0
540+ failed=0
541+ while IFS= read -r name; do
542+ [[ -z "${name// }" ]] && continue
543+ if release_check_blocking_job "$name"; then
544+ echo "::error::${name} is a package-safety Tideclaw alpha release-check lane."
545+ failed=1
546+ else
547+ saw_advisory=1
548+ fi
549+ done < <(jq -r '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | .name' <<< "$run_json")
550+551+ [[ "$saw_advisory" == "1" && "$failed" == "0" ]]
552+ }
553+514554 cancel_child() {
515555 if [[ -n "${run_id:-}" ]]; then
516556 echo "Cancelling child workflow ${workflow}: ${run_id}" >&2
@@ -534,13 +574,20 @@ jobs:
534574 done
535575 trap - EXIT INT TERM
536576537- conclusion="$(gh run view "$run_id" --json conclusion --jq '.conclusion')"
538- url="$(gh run view "$run_id" --json url --jq '.url')"
577+ run_json="$(gh run view "$run_id" --json conclusion,url,jobs)"
578+ conclusion="$(jq -r '.conclusion' <<< "$run_json")"
579+ url="$(jq -r '.url' <<< "$run_json")"
539580 echo "${workflow} finished with ${conclusion}: ${url}"
540581 echo "url=${url}" >> "$GITHUB_OUTPUT"
541582 echo "conclusion=${conclusion}" >> "$GITHUB_OUTPUT"
542583 if [[ "$conclusion" != "success" ]]; then
543- gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}' || true
584+ jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}' <<< "$run_json" || true
585+ if [[ "$workflow" == "openclaw-release-checks.yml" && "$CHILD_WORKFLOW_REF" =~ ^tideclaw/alpha/[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{4}Z$ ]]; then
586+ if release_checks_advisory_only "$run_json"; then
587+ echo "::warning::${workflow} ended with ${conclusion}, but Verify release checks accepted Tideclaw alpha advisory lanes."
588+ return 0
589+ fi
590+ fi
544591 exit 1
545592 fi
546593 }
@@ -798,10 +845,51 @@ jobs:
798845run: |
799846 set -euo pipefail
800847848+ release_check_blocking_job() {
849+ case "$1" in
850+ "resolve_target" | \
851+ "Prepare release package artifact" | \
852+ "install_smoke_release_checks / "* | \
853+ "Run package acceptance" | \
854+ "Run package acceptance / "*)
855+ return 0
856+ ;;
857+ esac
858+ return 1
859+ }
860+861+ release_checks_advisory_only() {
862+ local run_json="$1"
863+ local verifier_conclusion name saw_advisory failed
864+865+ verifier_conclusion="$(
866+ jq -r '.jobs[] | select(.name == "Verify release checks") | .conclusion' <<< "$run_json" |
867+ tail -n 1
868+ )"
869+ if [[ "$verifier_conclusion" != "success" ]]; then
870+ return 1
871+ fi
872+873+ saw_advisory=0
874+ failed=0
875+ while IFS= read -r name; do
876+ [[ -z "${name// }" ]] && continue
877+ if release_check_blocking_job "$name"; then
878+ echo "::error::${name} is a package-safety Tideclaw alpha release-check lane."
879+ failed=1
880+ else
881+ saw_advisory=1
882+ fi
883+ done < <(jq -r '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | .name' <<< "$run_json")
884+885+ [[ "$saw_advisory" == "1" && "$failed" == "0" ]]
886+ }
887+801888 check_child() {
802889 local label="$1"
803890 local run_id="$2"
804891 local required="$3"
892+ local advisory_ok="${4:-0}"
805893806894 if [[ -z "${run_id// }" ]]; then
807895 if [[ "$required" == "0" ]]; then
@@ -827,6 +915,12 @@ jobs:
827915 fi
828916829917 if [[ "$status" != "completed" || "$conclusion" != "success" ]]; then
918+ if [[ "$advisory_ok" == "1" && "$label" == "release_checks" ]]; then
919+ if release_checks_advisory_only "$run_json"; then
920+ echo "::warning::${label} child run ended with ${status}/${conclusion}, but Verify release checks accepted Tideclaw alpha advisory lanes: ${url}"
921+ return 0
922+ fi
923+ fi
830924 echo "::error::${label} child run ended with ${status}/${conclusion}: ${url}"
831925 jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, status, conclusion, url}' <<< "$run_json" || true
832926 return 1
@@ -1016,6 +1110,8 @@ jobs:
1016111010171111 if [[ "$RELEASE_CHECKS_RESULT" == "skipped" && -z "${RELEASE_CHECKS_RUN_ID// }" ]]; then
10181112 check_child "release_checks" "" "$release_checks_required" || failed=1
1113+ elif [[ "$CHILD_WORKFLOW_REF" =~ ^tideclaw/alpha/[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{4}Z$ ]]; then
1114+ check_child "release_checks" "$RELEASE_CHECKS_RUN_ID" 1 1 || failed=1
10191115 else
10201116 check_child "release_checks" "$RELEASE_CHECKS_RUN_ID" 1 || failed=1
10211117 fi
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。