Skip to content

ci: release each plugin as its container image, from a tag - #20

Merged
rosylilly merged 1 commit into
mainfrom
ci/release-images
Nov 26, 2026
Merged

rosylilly merged 1 commit into
mainfrom
ci/release-images

Conversation

@rosylilly

Copy link
Copy Markdown
Member

Summary

Plugins are released as container images only, one plugin at a time, from a tag. No GitHub releases, and no deb/rpm/pacman packages for now.

  • Trigger: a tag plugins/<name>/v<version> on a commit of main, such as plugins/my-media-ffmpeg/v0.1.0. Its path matches Go's convention for a module in a subdirectory.
  • plan reads the plugin and the version from the tag, and refuses:
    • a tag that is not v<major>.<minor>.<patch>[-<pre-release>]
    • a plugin with no plugins/<name>/Dockerfile
    • a commit that is not on main
    • a version already published on ghcr.io (a published version never changes)
  • build runs once per architecture, on native runners (ubuntu-24.04 and ubuntu-24.04-arm), not under QEMU:
    • runs the integration tests in the image's test stage, so arm64 is tested on arm64 for the first time (CI tests amd64 only);
    • pushes the runtime image by digest.
  • publish:
    • joins the two images into one index on ghcr.io/mycroblog/<name>;
    • tags it and adds the OCI annotations, so GitHub Packages shows the description and links this repository;
    • attests its provenance with actions/attest and pushes the attestation to the registry.

Image tags

Tag of the commit Tags of the image
plugins/<name>/v0.1.2 0.1.2, 0.1
plugins/<name>/v1.2.3 1.2.3, 1.2, 1
plugins/<name>/v0.2.0-rc.1 0.2.0-rc.1 only

There is no latest. A plugin speaks the protocol of the my version that buf.gen.yaml pins, so a deployment should name the version it runs. Each image records that version in the label dev.mycroblog.plugin.protocol. The plugin READMEs' quick starts now name :0.1 instead of :latest. Their "Not released yet" note stays until the first release.

BuildKit's own provenance and SBOM are off (provenance: false). They would add unknown/unknown entries to the index, and the attestation in publish covers provenance.

README

The Releases section now covers:

  • how to tag a release
  • which tags an image gets
  • how to see which plugins changed since their last release: affected -base plugins/<name>/v<last>, with no new tool, though a change to the harness lists every plugin
  • how to verify an image with gh attestation verify

Verified

  • actionlint (with shellcheck) passes on every workflow.
  • The tag step, run locally:
    • accepts v0.1.0, v1.2.3 and v0.2.0-rc.1, and gives the tags above;
    • rejects v01.0.0, 0.1.0 with no v, a tag without plugins/, and an unknown plugin.
  • The index step, run with a stub docker, passes the right tags, annotations and digests to imagetools create.
  • The actions are pinned by commit SHA, resolved from their latest release tags.

Not verified

  • The workflow has not run on GitHub yet. Pushing the first tag will be its first real run.
  • From this session I could not check that the debian:trixie-slim digest pinned in the Dockerfiles is a multi-architecture index. Docker Hub was out of reach. Dependabot normally pins the index, but if it is the amd64 manifest, the arm64 build fails at FROM.
  • ./scripts/lint.sh was not run: Go 1.27.4 could not be downloaded in this session. This PR changes no Go code, and CI runs lint.

After merging

  • Package visibility: the first push creates each package on ghcr.io as private. Make each one public in the org's package settings, and check that it is linked to this repository. The org may need to allow public packages.
  • Tag protection: a tag ruleset for plugins/*/v* that only maintainers can create or delete would stop anyone else from releasing.
  • Follow-up: the quick starts run the container as nobody with -socket-mode 0660. A my that runs on the host, not in a container, cannot open the socket unless its user matches. A note on --user, or a Podman Quadlet example, would help people who install my as a binary.

Generated by Claude Code

A tag plugins/<name>/v<version> on a commit of main releases that plugin
alone: its integration tests run in the test stage of its image on an amd64
and an arm64 runner, each pushes its runtime image by digest, and the two are
joined into one index on ghcr.io/mycroblog/<name>, tagged with the version and
its minor line (and its major line from 1.0.0 on), with its provenance
attested. A pre-release gets its version only, and there is no latest, since a
plugin speaks the protocol of the version of mycroblog/my it pins. The
workflow refuses a tag off main and a version already published.

No GitHub release is made: the images are the release. The READMEs say how to
release, which tags an image gets, how to tell which plugins changed since
their last release, and how to verify an image; the quick starts name 0.1
instead of latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcfE6PB6wKbbToXs5fq58g
@rosylilly
rosylilly merged commit 05d0791 into main Nov 26, 2026
11 checks passed
@rosylilly
rosylilly deleted the ci/release-images branch November 26, 2026 15:35
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