Skip to content

Fix: Wait for build result before opening submodule update PRs#38

Merged
jn-av merged 1 commit intomainfrom
fix-action
Apr 1, 2026
Merged

Fix: Wait for build result before opening submodule update PRs#38
jn-av merged 1 commit intomainfrom
fix-action

Conversation

@jn-av
Copy link
Copy Markdown
Member

@jn-av jn-av commented Apr 1, 2026

Fix: Wait for build result before opening submodule update PRs

Previously, update-submodule.yaml opened the PR immediately and then dispatched
the build separately — relying on workflow_run to update the PR body afterwards.
This was unreliable: workflow_run does not fire for workflow_dispatch runs on
non-default branches, so the PR body stayed at ⏳ pending forever.

New approach: The build is dispatched before the PR is opened. The workflow
polls for the result (every 20s, up to 10 min), then opens the PR with the final
status (✅ passed, ❌ failed, or ⚠️ unknown) already in the body.

Changes

  • update-submodule.yaml: Dispatch build → poll for result → open PR with
    final status. Removed the separate "Trigger test build" step.
  • test-build.yaml: Reverted to its original state — no longer needs
    pull-requests: write or the inline PR body update step.
  • update-pr-build-status.yaml: Deleted — fully superseded by the new
    synchronous approach.

// GitHub suppresses them to prevent infinite loops. We dispatch
// the build manually and wait for it to finish before opening the
// PR, so the PR body already shows the final build status.
await github.rest.actions.createWorkflowDispatch({
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be careful that this is not an attack vector.

@jn-av jn-av merged commit b017ef5 into main Apr 1, 2026
5 checks passed
@jn-av jn-av deleted the fix-action branch April 1, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants