Skip to content

ci(docker): push :latest when a prerelease is promoted to Latest - #259

Merged
thcp merged 1 commit into
mainfrom
ci/docker-latest-on-promote
Jul 12, 2026
Merged

ci(docker): push :latest when a prerelease is promoted to Latest#259
thcp merged 1 commit into
mainfrom
ci/docker-latest-on-promote

Conversation

@thcp

@thcp thcp commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Implements the requested tag behavior:

Trigger Tag
merge to main :edge
prerelease published :<version> only
prerelease promoted to Latest (or stable published) :latest + :<version>

Switches the release trigger from published to [prereleased, released]. GitHub fires released when a prerelease is changed to a full/Latest release, so promoting a prerelease now pushes :latest. Using these two actions also avoids the double run a stable publish would cause (it fires both published and released).

Listen to release `prereleased` and `released` actions instead of `published`:
- prereleased (prerelease published) -> version tag only (e.g. 0.8.0-alpha.6)
- released (stable publish, or a prerelease promoted to a full/Latest release)
  -> version tag + :latest
- push to main / manual dispatch -> :edge (unchanged)

Using these two actions instead of `published` also avoids a double run on a
stable publish (which fires both published and released).
@thcp
thcp merged commit a67b186 into main Jul 12, 2026
8 checks passed
@thcp
thcp deleted the ci/docker-latest-on-promote branch July 12, 2026 21:55
thcp added a commit that referenced this pull request Jul 13, 2026
…ished` (#266)

Publishing v0.8.0-alpha.7 (a draft prerelease -> published) never triggered
Docker Publish: CI/Linux/Windows/macOS releases all still listen for
`published` and fired correctly, but docker-publish.yml (changed in #259) only
listened for [prereleased, released] -- and `prereleased` did not fire for this
publish. Result: ghcr.io/stemdeckapp/stemdeck:0.8.0-alpha.7 was never pushed,
while the Unraid CA template already points at that (nonexistent) tag.

Fix: trigger on [published, released] -- published is the reliable trigger
every other release workflow already relies on; released is kept for promoting
an already-published prerelease to Latest via the release-label edit. The
:latest condition now also covers a plain non-prerelease `published` (not just
`released`), so a first-time stable release still gets :latest.

Also add a workflow_dispatch `version` input, so a specific tag can be
(re)pushed by hand to recover from a missed trigger without re-touching the
release (which would needlessly re-run the OS build workflows).
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.

1 participant