Skip to content

ci(release): add workflow_dispatch with tag input#954

Merged
cpcloud merged 4 commits intomicasa-dev:mainfrom
cpcloud:worktree-polished-floating-clarke
Apr 18, 2026
Merged

ci(release): add workflow_dispatch with tag input#954
cpcloud merged 4 commits intomicasa-dev:mainfrom
cpcloud:worktree-polished-floating-clarke

Conversation

@cpcloud
Copy link
Copy Markdown
Collaborator

@cpcloud cpcloud commented Apr 18, 2026

Summary

  • Adds a workflow_dispatch trigger to release.yml with a required
    tag input so maintainers can manually (re)build release artifacts
    for any tag when the release: published run failed to upload assets.
  • Auto-detects whether to advance the :latest, :<major>, and
    :<major>.<minor> Docker tags: a pre-goreleaser step asks GitHub for
    the current Latest release and sets MOVE_TAGS=true iff the ref being
    built equals it. .goreleaser.yaml templates each moving tag against
    .Env.MOVE_TAGS and collapses to {{ .Version }} (which goreleaser
    dedupes) when false.

v2.5.0 and v2.6.0 currently have no artifacts -- both release.yml
runs failed because useblacksmith/setup-docker-builder dropped an
untracked buildkitd.toml into the repo root and goreleaser aborted on
the 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.

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.
@cpcloud cpcloud added the ci CI/CD pipeline changes label Apr 18, 2026
cpcloud added 3 commits April 18, 2026 07:12
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.
@cpcloud cpcloud enabled auto-merge (squash) April 18, 2026 11:27
@cpcloud cpcloud merged commit e3abea1 into micasa-dev:main Apr 18, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD pipeline changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant