ci(release): add workflow_dispatch with tag input#954
Merged
cpcloud merged 4 commits intomicasa-dev:mainfrom Apr 18, 2026
Merged
ci(release): add workflow_dispatch with tag input#954cpcloud merged 4 commits intomicasa-dev:mainfrom
cpcloud merged 4 commits intomicasa-dev:mainfrom
Conversation
Lets maintainers manually (re)build release artifacts for a given tag when the release: published run failed to upload assets. The checkout ref falls back to the dispatch input when no release event is present.
On a normal publish of the newest release we want
ghcr.io/micasa-dev/micasa:latest, :<major>, and :<major>.<minor> to
advance to the new version. On a backfill dispatch of an older tag we
want only the immutable :<version> tag to be pushed, otherwise the
moving tags get dragged backward.
release.yml sets MOVE_TAGS to "true" when triggered by release:published
or when the operator explicitly opts in via the workflow_dispatch
move_tags input. .goreleaser.yaml reads .Env.MOVE_TAGS in each moving
tag template and collapses the line to {{ .Version }} when false, which
goreleaser dedupes against the first entry.
Replaces the move_tags workflow_dispatch input with a workflow step
that asks GitHub which release it considers "Latest" and compares that
against the ref being built. MOVE_TAGS resolves to true iff the build
ref equals the current Latest release; otherwise it is false and the
moving tag templates in .goreleaser.yaml collapse to {{ .Version }}.
This removes the footgun where a backfill operator had to remember to
opt out of advancing :latest / :<major> / :<major>.<minor>. Prereleases
are also handled correctly because gh release view skips them when
resolving Latest.
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.
Summary
workflow_dispatchtrigger torelease.ymlwith a requiredtaginput so maintainers can manually (re)build release artifactsfor any tag when the
release: publishedrun failed to upload assets.:latest,:<major>, and:<major>.<minor>Docker tags: a pre-goreleaser step asks GitHub forthe current Latest release and sets
MOVE_TAGS=trueiff the ref beingbuilt equals it.
.goreleaser.yamltemplates each moving tag against.Env.MOVE_TAGSand collapses to{{ .Version }}(which goreleaserdedupes) when false.
v2.5.0 and v2.6.0 currently have no artifacts -- both
release.ymlruns failed because
useblacksmith/setup-docker-builderdropped anuntracked
buildkitd.tomlinto the repo root and goreleaser aborted onthe dirty state. With this trigger, we can rebuild those tags (or any
future misfire) without recutting the release and without corrupting
the floating Docker tags, no manual flag required.