Skip to content

Commit 73d0439

Browse files
committed
fix(ci): detach optional ClawHub publishing
1 parent b8d43ea commit 73d0439

2 files changed

Lines changed: 11 additions & 16 deletions

File tree

‎.github/workflows/openclaw-release-publish.yml‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ on:
7272
- stable
7373
- full
7474
wait_for_clawhub:
75-
description: Wait for ClawHub plugin publish before marking this workflow complete
75+
description: Wait for and auto-approve ClawHub plugin publish; otherwise approve and monitor the detached runs separately
7676
required: true
7777
default: false
7878
type: boolean
@@ -2197,27 +2197,19 @@ jobs:
21972197
fi
21982198
fi
21992199
else
2200+
# Detached mode deliberately leaves protected ClawHub approvals to
2201+
# the operator monitoring the linked child runs. Polling for those
2202+
# gates here would put plugin fan-out back on the core release path.
22002203
if [[ -n "${plugin_clawhub_run_id}" ]]; then
2201-
wait_for_job_success plugin-clawhub-release.yml "${plugin_clawhub_run_id}" "Validate release publish approval" "${TARGET_SHA}"
2202-
if approve_child_publish_environment plugin-clawhub-release.yml "${plugin_clawhub_run_id}" "${TARGET_SHA}"; then
2203-
:
2204-
else
2205-
echo "- plugin-clawhub-release.yml: child environment gate not ready; publish was left dispatched (${plugin_clawhub_run_id})" >> "$GITHUB_STEP_SUMMARY"
2206-
fi
2207-
echo "- plugin-clawhub-release.yml: publish not awaited (${plugin_clawhub_run_id})" >> "$GITHUB_STEP_SUMMARY"
2204+
echo "- plugin-clawhub-release.yml: detached; approval and publish not awaited (${plugin_clawhub_run_id})" >> "$GITHUB_STEP_SUMMARY"
22082205
else
22092206
echo "- plugin-clawhub-release.yml: no normal OIDC publish to await" >> "$GITHUB_STEP_SUMMARY"
22102207
fi
22112208
if [[ -n "${plugin_clawhub_bootstrap_run_id}" ]]; then
22122209
if [[ "${plugin_clawhub_bootstrap_completed}" == "true" ]]; then
22132210
echo "- plugin-clawhub-new.yml: bootstrap already completed before continuing" >> "$GITHUB_STEP_SUMMARY"
22142211
else
2215-
if approve_clawhub_bootstrap_environments "${plugin_clawhub_bootstrap_run_id}" "${bootstrap_workflow_sha}"; then
2216-
:
2217-
else
2218-
echo "- plugin-clawhub-new.yml: child environment gates not ready; bootstrap was left dispatched (${plugin_clawhub_bootstrap_run_id})" >> "$GITHUB_STEP_SUMMARY"
2219-
fi
2220-
echo "- plugin-clawhub-new.yml: bootstrap not awaited (${plugin_clawhub_bootstrap_run_id})" >> "$GITHUB_STEP_SUMMARY"
2212+
echo "- plugin-clawhub-new.yml: detached; approvals and bootstrap not awaited (${plugin_clawhub_bootstrap_run_id})" >> "$GITHUB_STEP_SUMMARY"
22212213
fi
22222214
else
22232215
echo "- plugin-clawhub-new.yml: no bootstrap publish to await" >> "$GITHUB_STEP_SUMMARY"

‎test/scripts/package-acceptance-workflow.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,9 @@ describe("package acceptance workflow", () => {
570570

571571
expect(publishOrchestration.env?.PARENT_WORKFLOW_SHA).toBe("${{ github.sha }}");
572572
expect(publishOrchestration.env?.CHILD_WORKFLOW_REF).toBe("${{ github.ref_name }}");
573+
expect(readFileSync(RELEASE_PUBLISH_WORKFLOW, "utf8")).toContain(
574+
"otherwise approve and monitor the detached runs separately",
575+
);
573576
expectTextToIncludeAll(publishOrchestration.run, [
574577
'gh api "repos/${GITHUB_REPOSITORY}/commits/${encoded_workflow_ref}"',
575578
'if [[ "$resolved_workflow_sha" != "$expected_sha" ]]',
@@ -580,8 +583,8 @@ describe("package acceptance workflow", () => {
580583
'wait_for_run android-release.yml "${android_release_run_id}" "${TARGET_SHA}"',
581584
'wait_for_run plugin-npm-release.yml "${plugin_npm_run_id}" "${PARENT_WORKFLOW_SHA}"',
582585
'wait_for_run_background openclaw-npm-release.yml "${openclaw_npm_run_id}" "${PARENT_WORKFLOW_SHA}"',
583-
'approve_child_publish_environment plugin-clawhub-release.yml "${plugin_clawhub_run_id}" "${TARGET_SHA}"',
584-
'approve_clawhub_bootstrap_environments "${plugin_clawhub_bootstrap_run_id}" "${bootstrap_workflow_sha}"',
586+
"plugin-clawhub-release.yml: detached; approval and publish not awaited",
587+
"plugin-clawhub-new.yml: detached; approvals and bootstrap not awaited",
585588
]);
586589
});
587590

0 commit comments

Comments
 (0)