Skip to content

CI: publish the :dev image from main pushes - #200

Merged
Brandon-Haney merged 1 commit into
StudioNirin:mainfrom
Brandon-Haney:ci/publish-dev-tag-from-main
Jul 29, 2026
Merged

CI: publish the :dev image from main pushes#200
Brandon-Haney merged 1 commit into
StudioNirin:mainfrom
Brandon-Haney:ci/publish-dev-tag-from-main

Conversation

@Brandon-Haney

Copy link
Copy Markdown
Collaborator

Why

The publish job currently gates on a push to dev:

if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/dev')

There's no dev branch in this repo, so that half never fires and a published release is the only thing that produces an image. Merges to main run the test job and stop there.

The practical effect: every published tag currently points at the same build.

latest -> sha256:48266af1372f7c36db95574536c8c6a821d8d0c2fc536e124c3c7e4d3cebccc9
3.2.0  -> sha256:48266af1...
3.2    -> sha256:48266af1...
3      -> sha256:48266af1...

So there's nothing for a user to pull when a fix is merged, and no way to confirm a fix works before it goes into a release. This came up on #197, where the reporter asked how to test the merged fix and Unraid correctly showed no update available.

What this does

Adds main alongside dev on the job condition and on the :dev tag rule, so every merge publishes a rolling ghcr.io/<owner>/plexcache-d:dev.

Release behaviour is untouched. Semver tags and :latest stay release-only, so a merge to main cannot move the stable tag:

Event Publishes
merge to main :dev
push to dev :dev (unchanged)
full release semver + :latest (unchanged)
prerelease semver only (unchanged)
PR, or push to v3.0 nothing (unchanged)

Keeping the dev condition means nothing breaks if you create that branch later and want to move the rolling channel onto it.

Two lines, and reverting is just removing main from the two conditions.

Testing

After merge, the merge commit itself is a push to main, so the workflow should run and publish :dev. To confirm:

  1. Check the Actions run for the merge completes both test and build-and-push.
  2. docker pull ghcr.io/studionirin/plexcache-d:dev
  3. Confirm the :dev digest differs from :latest, and that :latest still resolves to the 3.2.0 build.

If you'd rather the rolling channel live on an actual dev branch instead, happy to redo it that way — this was the smaller change of the two.

The publish job gates on a push to `dev`, but that branch doesn't exist in this
repo, so the only trigger that ever fires is a published release. Merged work
has no image until the next release is cut, which leaves nothing for users to
test a fix against and no way to confirm one before it ships.

Adds `main` alongside `dev` on both the job condition and the `:dev` tag rule,
so every merge publishes a rolling `ghcr.io/<owner>/plexcache-d:dev`.

Release behaviour is unchanged. Semver tags and `:latest` remain release-only,
so a merge to main cannot move the stable tag:

  merge to main   -> :dev
  push to dev     -> :dev            (unchanged)
  full release    -> semver, :latest (unchanged)
  prerelease      -> semver          (unchanged)
  PR / v3.0 push  -> no publish      (unchanged)
@Brandon-Haney

Copy link
Copy Markdown
Collaborator Author

@StudioNirin review these when you are available, thanks

@Brandon-Haney
Brandon-Haney merged commit 3e776fe into StudioNirin:main Jul 29, 2026
2 checks passed
@Brandon-Haney
Brandon-Haney deleted the ci/publish-dev-tag-from-main branch July 30, 2026 02:51
Brandon-Haney added a commit that referenced this pull request Jul 30, 2026
Two fixes to the image publishing workflow, both surfaced while bringing the
rolling :dev channel online in #200.

Docker v2 manifests. Images are pushed with OCI media types, and Unraid's
update check requests only Docker media types, so the registry returns 404 for
the manifest and the container reports "not available" rather than an update
status. Verified against the registry with Docker-only Accept headers:

  studionirin/plexcache-d:dev     -> 404  (application/vnd.oci.image.manifest.v1+json)
  studionirin/plexcache-d:latest  -> 200  (application/vnd.docker.distribution.manifest.v2+json)

`provenance: false` was already set and isn't sufficient on its own, so this
also disables SBOM attestation and sets oci-mediatypes=false via the image
exporter, which puts buildx back on a plain Docker v2 manifest. Pulling was
never affected — Docker handles OCI fine — so this only changes what the update
check can read. This matters most on a release: users whose update status reads
"not available" are never told a new version exists.

Cancel superseded builds. #199 and #200 merged 13 seconds apart. Both started a
build, and the older commit's run finished two seconds later, so it won the
:dev tag and left it pointing at a commit missing the newer merge. A
concurrency group keyed on the ref cancels the stale run so :dev always tracks
the newest push. Release builds use their own ref and are unaffected.

No change to which events publish or to the tags produced.
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.

2 participants