Repository navigation
ci: publish the container image to docker hub - #12
Merged
Merged
Conversation
The image is the install, but nothing published it: README and docker/README told a reader to build the tag themselves, and the docs test asserted that no workflow may push one. A tag now publishes. .github/workflows/docker-publish.yml builds both architectures from a v*.*.* tag and pushes the version and latest. It is the only workflow that may hold a write-scoped registry credential, so it refuses a tag that is not on main, whose version differs from package.json, or whose CI has not concluded green. A branch dispatch stops before it logs in: the version gate is skipped for a non-tag ref. The docs now name the published image - the tags, a pull and run example, and how a release is published - and the compose file keeps building the checkout so it still runs what you are editing. The test section that forbade a publish workflow becomes the opposite invariant: the publish job is tag-gated, CI never pushes, and the docs name the image.
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
.github/workflows/docker-publish.yml: av*.*.*tag buildslinux/amd64+linux/arm64and pushesdinhdev666/opencode-router:<version>and:latestto Docker Hub. Follows the same shape as the provider project's publish workflow (tag-only, version gate, provenance + SBOM).v*.*.*tag (workflow_dispatchfrom a branch stops before it logs in), the tagged commit must already be onmain, and every completed check run on it must besuccess/skipped/neutral. A tag that is not equal toversioninpackage.jsonis refused too.docker pull/docker run, a "build from a checkout" subsection, and a "Publishing a release" section.README.md,AGENTS.mdandCONTRIBUTING.mddescribe the same flow.docker-compose.ymlkeeps building the checkout (opencode-router:local); it does not pull the published tag.test/unit-docs.mjsreplaces the old "no workflow publishes an image" invariant with the opposite one: the publish job must be tag-gated,ci.ymlmust never push, and the docs must name the image.What this PR does not do
It does not publish anything. The publish job needs the
DOCKERHUB_USERNAMEandDOCKERHUB_TOKENrepository secrets, and no tag is pushed here.Verification
pnpm run check(20 action references across 2 workflows, all pinned)pnpm run test:unit(159/159)pnpm run typecheckandpnpm run buildare unaffected (noweb/or runtime change); CI runs them.