Skip to content

fix: gate release-build dispatch on configured workflow - #184

Merged
joshua-temple merged 3 commits into
mainfrom
fix/release-build-trigger
Jun 16, 2026
Merged

joshua-temple merged 3 commits into
mainfrom
fix/release-build-trigger

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

The promote finalize stage emitted a "Trigger Release Build" step running a hardcoded gh workflow run Release, guarded only by an act/gitea GITHUB_SERVER_URL check. On real GitHub the step always fired and failed for any repo without a workflow literally named "Release":

could not find any workflows named Release

Most consumer repos have no such workflow, so this blocked every repo at final publish.

Fix

Add an optional release.workflow field to the manifest and emit the Trigger Release Build step only when it is set, dispatching the configured workflow path via normalizeWorkflowPath. This mirrors the existing publish.workflow config-driven pattern in the same finalize job. When release.workflow is unset, no dispatch step is emitted, so unconfigured repos opt out cleanly rather than failing. The now-redundant act/gitea server-URL guard is removed since the step is config-gated.

Verification

  • New table-driven test TestPromoteGenerator_ReleaseBuildDispatch: asserts no step / no dispatch when unconfigured, and a dispatch to the configured normalized path when set (written failing first).
  • go build ./..., go test ./... (1362 pass), golangci-lint run ./... (clean), e2e module go build + go vet clean.
  • No e2e scenario relied on the old dispatch (verified: no fixture sets release.workflow; no scenario asserts the Release dispatch).

The promote finalize stage emitted a hardcoded 'gh workflow run Release'
step on every final publish, guarded only by an act/gitea server-URL check.
On real GitHub this always fired and failed for any repo without a workflow
named Release (could not find any workflows named Release), blocking final
publish.

Add an optional release.workflow field and emit the Trigger Release Build
step only when it is set, dispatching the configured workflow path. This
mirrors the existing publish.workflow pattern. When unset, no dispatch is
emitted.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 4db98bf into main Jun 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant