mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:10:42 +00:00
fix(ci): stabilize full release validation
This commit is contained in:
17
.github/workflows/full-release-validation.yml
vendored
17
.github/workflows/full-release-validation.yml
vendored
@@ -246,6 +246,23 @@ jobs:
|
||||
echo "- Target SHA: \`${TARGET_SHA}\`"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
cancel_same_sha_push_ci() {
|
||||
local run_ids run_id
|
||||
run_ids="$(
|
||||
gh run list --workflow ci.yml --limit 100 --json databaseId,event,headSha,status \
|
||||
--jq 'map(select(.event == "push" and .headSha == env.TARGET_SHA and (.status == "queued" or .status == "in_progress" or .status == "waiting" or .status == "pending"))) | .[].databaseId'
|
||||
)"
|
||||
if [[ -z "${run_ids// }" ]]; then
|
||||
return 0
|
||||
fi
|
||||
while IFS= read -r run_id; do
|
||||
[[ -n "${run_id// }" ]] || continue
|
||||
echo "Cancelling same-SHA push CI run ${run_id}; Full Release Validation dispatches the full manual CI child for ${TARGET_SHA}."
|
||||
gh run cancel "$run_id" || gh api -X POST "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/force-cancel" || true
|
||||
done <<< "$run_ids"
|
||||
}
|
||||
|
||||
cancel_same_sha_push_ci
|
||||
dispatch_and_wait ci.yml -f target_ref="$TARGET_SHA"
|
||||
|
||||
release_checks:
|
||||
|
||||
Reference in New Issue
Block a user