fix(ci): detach optional ClawHub publishing

This commit is contained in:
Peter Steinberger
2026-07-17 08:45:17 +01:00
parent b8d43ea49a
commit 73d04395de
2 changed files with 11 additions and 16 deletions
+6 -14
View File
@@ -72,7 +72,7 @@ on:
- stable
- full
wait_for_clawhub:
description: Wait for ClawHub plugin publish before marking this workflow complete
description: Wait for and auto-approve ClawHub plugin publish; otherwise approve and monitor the detached runs separately
required: true
default: false
type: boolean
@@ -2197,14 +2197,11 @@ jobs:
fi
fi
else
# Detached mode deliberately leaves protected ClawHub approvals to
# the operator monitoring the linked child runs. Polling for those
# gates here would put plugin fan-out back on the core release path.
if [[ -n "${plugin_clawhub_run_id}" ]]; then
wait_for_job_success plugin-clawhub-release.yml "${plugin_clawhub_run_id}" "Validate release publish approval" "${TARGET_SHA}"
if approve_child_publish_environment plugin-clawhub-release.yml "${plugin_clawhub_run_id}" "${TARGET_SHA}"; then
:
else
echo "- plugin-clawhub-release.yml: child environment gate not ready; publish was left dispatched (${plugin_clawhub_run_id})" >> "$GITHUB_STEP_SUMMARY"
fi
echo "- plugin-clawhub-release.yml: publish not awaited (${plugin_clawhub_run_id})" >> "$GITHUB_STEP_SUMMARY"
echo "- plugin-clawhub-release.yml: detached; approval and publish not awaited (${plugin_clawhub_run_id})" >> "$GITHUB_STEP_SUMMARY"
else
echo "- plugin-clawhub-release.yml: no normal OIDC publish to await" >> "$GITHUB_STEP_SUMMARY"
fi
@@ -2212,12 +2209,7 @@ jobs:
if [[ "${plugin_clawhub_bootstrap_completed}" == "true" ]]; then
echo "- plugin-clawhub-new.yml: bootstrap already completed before continuing" >> "$GITHUB_STEP_SUMMARY"
else
if approve_clawhub_bootstrap_environments "${plugin_clawhub_bootstrap_run_id}" "${bootstrap_workflow_sha}"; then
:
else
echo "- plugin-clawhub-new.yml: child environment gates not ready; bootstrap was left dispatched (${plugin_clawhub_bootstrap_run_id})" >> "$GITHUB_STEP_SUMMARY"
fi
echo "- plugin-clawhub-new.yml: bootstrap not awaited (${plugin_clawhub_bootstrap_run_id})" >> "$GITHUB_STEP_SUMMARY"
echo "- plugin-clawhub-new.yml: detached; approvals and bootstrap not awaited (${plugin_clawhub_bootstrap_run_id})" >> "$GITHUB_STEP_SUMMARY"
fi
else
echo "- plugin-clawhub-new.yml: no bootstrap publish to await" >> "$GITHUB_STEP_SUMMARY"
@@ -570,6 +570,9 @@ describe("package acceptance workflow", () => {
expect(publishOrchestration.env?.PARENT_WORKFLOW_SHA).toBe("${{ github.sha }}");
expect(publishOrchestration.env?.CHILD_WORKFLOW_REF).toBe("${{ github.ref_name }}");
expect(readFileSync(RELEASE_PUBLISH_WORKFLOW, "utf8")).toContain(
"otherwise approve and monitor the detached runs separately",
);
expectTextToIncludeAll(publishOrchestration.run, [
'gh api "repos/${GITHUB_REPOSITORY}/commits/${encoded_workflow_ref}"',
'if [[ "$resolved_workflow_sha" != "$expected_sha" ]]',
@@ -580,8 +583,8 @@ describe("package acceptance workflow", () => {
'wait_for_run android-release.yml "${android_release_run_id}" "${TARGET_SHA}"',
'wait_for_run plugin-npm-release.yml "${plugin_npm_run_id}" "${PARENT_WORKFLOW_SHA}"',
'wait_for_run_background openclaw-npm-release.yml "${openclaw_npm_run_id}" "${PARENT_WORKFLOW_SHA}"',
'approve_child_publish_environment plugin-clawhub-release.yml "${plugin_clawhub_run_id}" "${TARGET_SHA}"',
'approve_clawhub_bootstrap_environments "${plugin_clawhub_bootstrap_run_id}" "${bootstrap_workflow_sha}"',
"plugin-clawhub-release.yml: detached; approval and publish not awaited",
"plugin-clawhub-new.yml: detached; approvals and bootstrap not awaited",
]);
});