ci: allow building a dev image from a branch without cutting a release - #319
Merged
Conversation
Diagnosing the external HTTP/2 failure has required five prereleases (v0.1.6-rc.1 .. rc.5) purely to get an image onto dev, because release.yml only triggers on v* tags and ci.yml builds no image at all. That has two costs beyond the wasted tags: it manufactures real GitHub releases for throwaway diagnostic builds, and the deploy workflow in nudgebee-infra resolves the newest version-shaped tag from GHCR, so every RC becomes eligible for automatic deployment to dev. Adds workflow_dispatch. Dispatched runs publish dev-<branch> and dev-<shortsha> and nothing else. Neither matches ^[0-9]+\.[0-9]+\.[0-9]+, so they are invisible to the infra resolver, and the semver patterns stay gated on tag pushes so latest/0.1/0 never move. Two things had to be gated rather than left to run on both event types: - "Verify tag is on main" compares GITHUB_SHA against origin/main, which is the correct policy for a release but would block dispatching from a branch — the entire purpose here. - "Create GitHub release with binaries" uses github.ref_name as the release name with make_latest: true. On a dispatch that is a branch name, so it would publish a release named after the branch and mark it the latest release. Tags come from type=ref/type=sha rather than a raw value because branch names contain "/" (diag/http2-frame-direction), which is not a legal Docker tag; metadata-action sanitises it.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
blue4209211
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Diagnosing the external HTTP/2 failure has required five prereleases (
v0.1.6-rc.1…rc.5) purely to get an image onto dev.release.ymlonly triggers onv*tags, andci.ymlbuilds no image at all — so there is currently no way to test a branch.That has two costs beyond the wasted tags:
nudgebee-infraresolves the newest version-shaped tag from GHCR, so every RC becomes eligible for automatic deployment to dev. That hazard is live — aworkflow_dispatchrun at 08:30Z picked up an RC.Change
Adds
workflow_dispatchtorelease.yml. Dispatched runs publishdev-<branch>anddev-<shortsha>and nothing else.Neither matches
^[0-9]+\.[0-9]+\.[0-9]+, so they are invisible to the infra resolver, and thetype=semverpatterns stay gated on tag pushes —latest,0.1and0never move.Two steps that had to be gated
Both would have misbehaved on a dispatch, and neither is obvious from a skim:
Verify tag is on maincomparesGITHUB_SHAagainstorigin/main. Correct policy for a release, but it would block dispatching from a branch — the entire purpose here.Create GitHub release with binariesusesgithub.ref_nameas the release name withmake_latest: true. On a dispatch that is a branch name, so it would publish a GitHub release named after the branch and mark it the latest release.Tag sanitisation
Tags come from
type=ref/type=sharather than a raw value: branch names contain/(diag/http2-frame-direction), which is not a legal Docker tag.metadata-actionsanitises it. A raw${{ github.ref_name }}would have failed the build.Testing
YAML validated. Not exercised end-to-end — the first dispatch run is the test, and it is low-risk: worst case the build fails and no tag moves, since every release-affecting step is gated to
push.