


























@@ -109,8 +109,13 @@ jobs:
109109needs: [resolve_target]
110110runs-on: ubuntu-24.04
111111timeout-minutes: 240
112+outputs:
113+run_id: ${{ steps.dispatch.outputs.run_id }}
114+url: ${{ steps.dispatch.outputs.url }}
115+conclusion: ${{ steps.dispatch.outputs.conclusion }}
112116steps:
113117 - name: Dispatch and monitor CI
118+id: dispatch
114119env:
115120GH_TOKEN: ${{ github.token }}
116121TARGET_REF: ${{ inputs.ref }}
@@ -146,6 +151,7 @@ jobs:
146151 fi
147152148153 echo "Dispatched ${workflow}: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
154+ echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
149155150156 while true; do
151157 status="$(gh run view "$run_id" --json status --jq '.status')"
@@ -158,9 +164,10 @@ jobs:
158164 conclusion="$(gh run view "$run_id" --json conclusion --jq '.conclusion')"
159165 url="$(gh run view "$run_id" --json url --jq '.url')"
160166 echo "${workflow} finished with ${conclusion}: ${url}"
167+ echo "url=${url}" >> "$GITHUB_OUTPUT"
168+ echo "conclusion=${conclusion}" >> "$GITHUB_OUTPUT"
161169 if [[ "$conclusion" != "success" ]]; then
162- gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}'
163- exit 1
170+ gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}' || true
164171 fi
165172 }
166173@@ -178,8 +185,13 @@ jobs:
178185needs: [resolve_target]
179186runs-on: ubuntu-24.04
180187timeout-minutes: 720
188+outputs:
189+run_id: ${{ steps.dispatch.outputs.run_id }}
190+url: ${{ steps.dispatch.outputs.url }}
191+conclusion: ${{ steps.dispatch.outputs.conclusion }}
181192steps:
182193 - name: Dispatch and monitor release checks
194+id: dispatch
183195env:
184196GH_TOKEN: ${{ github.token }}
185197TARGET_REF: ${{ inputs.ref }}
@@ -217,6 +229,7 @@ jobs:
217229 fi
218230219231 echo "Dispatched ${workflow}: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
232+ echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
220233221234 while true; do
222235 status="$(gh run view "$run_id" --json status --jq '.status')"
@@ -229,9 +242,10 @@ jobs:
229242 conclusion="$(gh run view "$run_id" --json conclusion --jq '.conclusion')"
230243 url="$(gh run view "$run_id" --json url --jq '.url')"
231244 echo "${workflow} finished with ${conclusion}: ${url}"
245+ echo "url=${url}" >> "$GITHUB_OUTPUT"
246+ echo "conclusion=${conclusion}" >> "$GITHUB_OUTPUT"
232247 if [[ "$conclusion" != "success" ]]; then
233- gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}'
234- exit 1
248+ gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}' || true
235249 fi
236250 }
237251@@ -255,8 +269,13 @@ jobs:
255269if: inputs.npm_telegram_package_spec != ''
256270runs-on: ubuntu-24.04
257271timeout-minutes: 120
272+outputs:
273+run_id: ${{ steps.dispatch.outputs.run_id }}
274+url: ${{ steps.dispatch.outputs.url }}
275+conclusion: ${{ steps.dispatch.outputs.conclusion }}
258276steps:
259277 - name: Dispatch and monitor npm Telegram E2E
278+id: dispatch
260279env:
261280GH_TOKEN: ${{ github.token }}
262281WORKFLOW_REF: ${{ inputs.workflow_ref }}
@@ -293,6 +312,7 @@ jobs:
293312 fi
294313295314 echo "Dispatched npm-telegram-beta-e2e.yml: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
315+ echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
296316297317 while true; do
298318 status="$(gh run view "$run_id" --json status --jq '.status')"
@@ -305,9 +325,10 @@ jobs:
305325 conclusion="$(gh run view "$run_id" --json conclusion --jq '.conclusion')"
306326 url="$(gh run view "$run_id" --json url --jq '.url')"
307327 echo "npm-telegram-beta-e2e.yml finished with ${conclusion}: ${url}"
328+ echo "url=${url}" >> "$GITHUB_OUTPUT"
329+ echo "conclusion=${conclusion}" >> "$GITHUB_OUTPUT"
308330 if [[ "$conclusion" != "success" ]]; then
309- gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}'
310- exit 1
331+ gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, conclusion, url}' || true
311332 fi
312333313334 summary:
@@ -347,7 +368,7 @@ jobs:
347368 --arg release_id "$release_id" \
348369 --arg release_ref "$TARGET_REF" \
349370 --arg package_spec "$PACKAGE_SPEC" \
350- --arg notes "Automatically requested by Full Release Validation ${GITHUB_RUN_ID_VALUE} after child workflows completed." \
371+ --arg notes "Automatically requested by Full Release Validation ${GITHUB_RUN_ID_VALUE} after child workflows completed; the parent summary re-checks current child run conclusions." \
351372 '{
352373 event_type: "openclaw_full_release_validation_completed",
353374 client_payload: {
@@ -370,22 +391,51 @@ jobs:
370391371392 - name: Verify child workflow results
372393env:
373-NORMAL_CI_RESULT: ${{ needs.normal_ci.result }}
374-RELEASE_CHECKS_RESULT: ${{ needs.release_checks.result }}
394+GH_TOKEN: ${{ github.token }}
395+NORMAL_CI_RUN_ID: ${{ needs.normal_ci.outputs.run_id }}
396+RELEASE_CHECKS_RUN_ID: ${{ needs.release_checks.outputs.run_id }}
397+NPM_TELEGRAM_RUN_ID: ${{ needs.npm_telegram.outputs.run_id }}
375398NPM_TELEGRAM_RESULT: ${{ needs.npm_telegram.result }}
376399run: |
377400 set -euo pipefail
378- failed=0
379- for item in \
380- "normal_ci=${NORMAL_CI_RESULT}" \
381- "release_checks=${RELEASE_CHECKS_RESULT}" \
382- "npm_telegram=${NPM_TELEGRAM_RESULT}"
383- do
384- name="${item%%=*}"
385- result="${item#*=}"
386- if [[ "$result" != "success" && "$result" != "skipped" ]]; then
387- echo "::error::${name} ended with ${result}"
388- failed=1
401+402+ check_child() {
403+ local label="$1"
404+ local run_id="$2"
405+ local required="$3"
406+407+ if [[ -z "${run_id// }" ]]; then
408+ if [[ "$required" == "0" ]]; then
409+ echo "${label}: skipped"
410+ return 0
411+ fi
412+ echo "::error::${label} did not record a child run id."
413+ return 1
389414 fi
390- done
415+416+ local status conclusion url attempt
417+ status="$(gh run view "$run_id" --json status --jq '.status')"
418+ conclusion="$(gh run view "$run_id" --json conclusion --jq '.conclusion')"
419+ url="$(gh run view "$run_id" --json url --jq '.url')"
420+ attempt="$(gh run view "$run_id" --json attempt --jq '.attempt')"
421+ echo "${label}: ${status}/${conclusion} attempt ${attempt}: ${url}"
422+423+ if [[ "$status" != "completed" || "$conclusion" != "success" ]]; then
424+ echo "::error::${label} child run ended with ${status}/${conclusion}: ${url}"
425+ gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, status, conclusion, url}' || true
426+ return 1
427+ fi
428+ }
429+430+ failed=0
431+432+ check_child "normal_ci" "$NORMAL_CI_RUN_ID" 1 || failed=1
433+ check_child "release_checks" "$RELEASE_CHECKS_RUN_ID" 1 || failed=1
434+435+ if [[ "$NPM_TELEGRAM_RESULT" == "skipped" && -z "${NPM_TELEGRAM_RUN_ID// }" ]]; then
436+ check_child "npm_telegram" "" 0 || failed=1
437+ else
438+ check_child "npm_telegram" "$NPM_TELEGRAM_RUN_ID" 1 || failed=1
439+ fi
440+391441 exit "$failed"
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。