fix: chain coder build via explicit workflow-dispatch #23

Merged
agent merged 4 commits from fix/workflow-dispatch-chain into main 2026-02-17 18:51:43 -08:00
Owner

Fixes #22

Problem

workflow_run is not reliably triggering in Forgejo — the coder build was silently not firing after the base build succeeded.

Fix

build.yaml

Added a final step using git.michaelsagger.org/actions/workflow-dispatch@main to explicitly dispatch build-coder.yml after a successful base build. This is the approach Brad suggested in the issue.

build-coder.yml

Simplified trigger to workflow_dispatch only — removes the unreliable workflow_run trigger and the associated if: condition in the job. The explicit dispatch from build.yaml guarantees ordering and only fires on success.

Flow after this fix

push to main
  └─> build.yaml (base image)
        └─> [success] workflow-dispatch → build-coder.yml (coder image)

No more manual triggering required.

Fixes #22 ## Problem `workflow_run` is not reliably triggering in Forgejo — the coder build was silently not firing after the base build succeeded. ## Fix ### `build.yaml` Added a final step using `git.michaelsagger.org/actions/workflow-dispatch@main` to explicitly dispatch `build-coder.yml` after a successful base build. This is the approach Brad suggested in the issue. ### `build-coder.yml` Simplified trigger to `workflow_dispatch` only — removes the unreliable `workflow_run` trigger and the associated `if:` condition in the job. The explicit dispatch from `build.yaml` guarantees ordering and only fires on success. ## Flow after this fix ``` push to main └─> build.yaml (base image) └─> [success] workflow-dispatch → build-coder.yml (coder image) ``` No more manual triggering required.
brad requested changes 2026-02-17 18:47:20 -08:00
Dismissed
brad left a comment
Owner

see comment

see comment
@ -40,2 +40,4 @@
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rbw openclaw-sandbox:rbw
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rbw openclaw-sandbox:latest
- name: Trigger coder build
Owner

can't we make this depend on the success of the preivous build step?

can't we make this depend on the success of the preivous build step?
Replace workflow-dispatch action approach with native needs: dependency.
- Merge build-coder.yml into build.yaml as a second job (build-coder)
- build-coder needs: build-base — only runs if base build succeeds
- Remove build-coder.yml (no longer needed)
- Remove dependency on external workflow-dispatch action

Simpler, more reliable, no external action required.

Closes #22
Author
Owner

Good call — needs: is cleaner and avoids the external action entirely.

Updated the PR: consolidated both workflows into a single build.yaml with two jobs:

build-base  →  build-coder (needs: build-base)

build-coder.yml is gone. The needs: dependency guarantees ordering and only fires on success — native to Forgejo, no third-party action required.

Good call — `needs:` is cleaner and avoids the external action entirely. Updated the PR: consolidated both workflows into a single `build.yaml` with two jobs: ``` build-base → build-coder (needs: build-base) ``` `build-coder.yml` is gone. The `needs:` dependency guarantees ordering and only fires on success — native to Forgejo, no third-party action required.
brad requested changes 2026-02-17 18:49:47 -08:00
Dismissed
brad left a comment
Owner

no sorry i prefer two workflows. just revert to the previous that's good enough

no sorry i prefer two workflows. just revert to the previous that's good enough
Author
Owner

Reverted the consolidation — two workflows are back. build.yaml dispatches build-coder.yml via workflow-dispatch when the base build succeeds. Same flow as before the needs: attempt.

Ready for re-review.

Reverted the consolidation — two workflows are back. `build.yaml` dispatches `build-coder.yml` via workflow-dispatch when the base build succeeds. Same flow as before the `needs:` attempt. Ready for re-review.
brad approved these changes 2026-02-17 18:51:12 -08:00
agent merged commit a94d734dc2 into main 2026-02-17 18:51:43 -08:00
agent deleted branch fix/workflow-dispatch-chain 2026-02-17 18:51:43 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
commune/sandbox!23
No description provided.