fix(release): require exact publish child runs · openclaw/openclaw@1c3da22
vincentkoc
·
2026-06-20
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -519,12 +519,7 @@ jobs:
|
519 | 519 | local workflow="$1" |
520 | 520 | shift |
521 | 521 | |
522 | | - local before_json dispatch_output run_id |
523 | | - before_json="$(gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/workflows/${workflow}/runs" \ |
524 | | - -F event=workflow_dispatch \ |
525 | | - -F per_page=100 \ |
526 | | - --jq '[.workflow_runs[].id]')" |
527 | | - |
| 522 | + local dispatch_output run_id |
528 | 523 | dispatch_output="$(gh workflow run --repo "$GITHUB_REPOSITORY" "$workflow" --ref "$workflow_ref" "$@" 2>&1)" |
529 | 524 | printf '%s\n' "$dispatch_output" >&2 |
530 | 525 | run_id="$( |
@@ -534,22 +529,7 @@ jobs:
|
534 | 529 | )" |
535 | 530 | |
536 | 531 | if [[ -z "$run_id" ]]; then |
537 | | - for _ in $(seq 1 60); do |
538 | | - run_id="$( |
539 | | - BEFORE_IDS="$before_json" gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/workflows/${workflow}/runs" \ |
540 | | - -F event=workflow_dispatch \ |
541 | | - -F per_page=50 \ |
542 | | - --jq '.workflow_runs | map({databaseId:.id, createdAt:.created_at}) | map(select(.databaseId as $id | (env.BEFORE_IDS | fromjson | index($id) | not))) | sort_by(.createdAt) | reverse | .[0].databaseId // empty' |
543 | | - )" |
544 | | - if [[ -n "$run_id" ]]; then |
545 | | - break |
546 | | - fi |
547 | | - sleep 5 |
548 | | - done |
549 | | - fi |
550 | | - |
551 | | - if [[ -z "${run_id:-}" ]]; then |
552 | | - echo "Could not find dispatched run for ${workflow}." >&2 |
| 532 | + echo "gh workflow run ${workflow} did not return an Actions run URL; refusing to guess from recent workflow_dispatch runs." >&2 |
553 | 533 | exit 1 |
554 | 534 | fi |
555 | 535 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。