Skip to content

ci(release): stop publishing on main and make the deploy path follow releases - #944

Open
chappie-daemon wants to merge 4 commits into
mainfrom
fix/stop-publishing-container-outside-release
Open

chappie-daemon wants to merge 4 commits into
mainfrom
fix/stop-publishing-container-outside-release

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

Carries avantikonde's commit 2c977e6 (authorship preserved) and adds one commit for the acceptance criteria it left open.

Closes #881

What the first commit does

Removes the publish-container-image job from checks.yml, so a push to main no longer publishes ghcr.io/cameri/nostream. It is a 57-line deletion with zero lines added, no permission change, and release.yml untouched. The deploy docs, compose stacks and website snippet move from :main to :latest, and the CI test is rewritten to assert the publish job is gone and that release.yml is the only holder of packages: write.

What the second commit adds, and why

Two acceptance criteria were still open, both on the deploy side.

The tag is now named, not inherited. release.yml had no tags: input, relying on docker/metadata-action's defaults to produce latest. The defaults do produce it — the v3.4.1 run log shows ghcr.io/cameri/nostream:v3.4.1 and ghcr.io/cameri/nostream:latest — but the deploy path now depends on that behaviour, so it is stated in the workflow and asserted by the spec. A default that changes silently would strand every host on its last pulled image.

The deploy path follows releases. relay.tnsor.network pulls through a GitHub webhook that accepted only push to the watched branch and asked for tag main. With pushes no longer publishing, that path could never see a new image. The fix lives in containers/nostream-dev-webhook/ in the workspace repo (cameri/phoenix-server) — committed and pushed there, since the webhook stack is not part of this repository. DEPLOY-RUNBOOK.md records the two host-side steps it requires.

Verification

Check Result
spec with the change 3 passing
spec with checks.yml reverted fails — expected {…} to be undefined
spec with the tags: block removed fails — the new tag assertion
biome lint on the changed spec clean
release.yml / checks.yml YAML parse; packages: write only on build-and-push-image
webhook mapping, six cases verified against redpanda-connect 4.47.0 in a real pipeline

The webhook verification is worth a line: running the actual mapping through redpanda-connect caught a defect in my first draft — Bloblang has has_prefix, not starts_with — which no amount of reading the config would have found. All six branches (push to the watched branch, push elsewhere, relay release, website release, edited release, ping) now produce the expected accept or ignore.

Five failures in test/unit/repositories/user-subscription-repository.spec.ts appear in the full suite. They are pre-existing: the same 5 fail at base e417437 on this branch's parent, and this change touches no repository code.

Rollout

Merging this stops image publishing on main immediately. Before the next deploy, the host needs NOSTREAM_TAG=latest and the GitHub webhook subscribed to releases. Until both are done, deployments are manual — pull the tag by hand. DEPLOY-RUNBOOK.md says so.

Credit

Original work: avantikonde — commit 2c977e6, and the diagnosis in #881 of what had to move. Their contribution is unmodified in the first commit.

avantikonde and others added 2 commits October 23, 2026 17:08
The container-publish removal left two acceptance criteria open. The relay host
pulls its image through a GitHub webhook, and that stack both pulled tag `main`
and ignored every event except a push to the watched branch. With pushes no
longer publishing, that path could never see a new image.

- release.yml names its tags instead of inheriting metadata-action's defaults:
  the version and `latest`, which is the tag deploys pull. The defaults already
  produce these for a vX.Y.Z release, but a default is not a contract, and the
  deploy path now depends on it.
- DEPLOY-RUNBOOK records the two host-side steps the change requires, and says
  plainly that deployments are manual until both are done.
- the spec asserts the `latest` tag, so a silent action change cannot strand a
  host on its last pulled image.
@chappie-daemon
chappie-daemon deployed to website-preview October 23, 2026 21:25 — with GitHub Actions Active
@changeset-bot

changeset-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3db1159

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
nostream Patch
nostream-website Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Site preview for this PR (includes all changes on this branch): https://nostream-web-pr-944.cameri.workers.dev/preview/944/

The https://ema.tnsor.network/preview/944/ form serves the same build once this PR merges — the production router that proxies /preview/* ships with it.

Updates with every push to this PR; deleted when the PR closes.

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the outstanding pinned-image example is a non-blocking documentation issue.

Findings

  1. P2 Pinned image example cannot work ▶

Summary

Moves container publishing from pushes to main to relay releases.

  • Published relay releases now publish images with version, release, and latest tags.
  • Production deploys now use the released latest image.

Reviews (3) · Last reviewed commit: "Merge branch 'main' into fix/stop-publis..." · Reviewed by Greptile

Comment thread test/unit/ci/publish-container-image.spec.ts Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread docs/DEPLOY-RUNBOOK.md
@coveralls

coveralls commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 40056789724

Warning

No base build found for commit c40e570 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 75.458%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 11286
Covered Lines: 8906
Line Coverage: 78.91%
Relevant Branches: 5848
Covered Branches: 4023
Branch Coverage: 68.79%
Branches in Coverage %: Yes
Coverage Strength: 801.77 hits per line

💛 - Coveralls

@cameri
cameri requested a review from Ferryx349 October 23, 2026 21:34
@cameri

cameri commented Oct 23, 2026

Copy link
Copy Markdown
Owner

@Ferryx349 Adding you as reviewer. This code changes how releases are published hence we need to ensure this won't break our sandbox deployment.

The release gate only matched tags starting with `v`, but changesets has
tagged every relay release `nostream@X.Y.Z` since 3.5.0. Every release from
that point on was skipped by the job-level `if:`, so the workflow has not
published an image since v3.4.1 - and with the publisher now removed from
`checks.yml`, nothing does.

Three faults, all in the tag path:

- the `if:` did not match the changesets tag;
- a semver rule derives its input from the git ref and emits nothing for a
  non-semver tag, and with no version the `latest` rule is skipped as well,
  so even a matched release would have pushed no tag. Neither `prefix=` nor
  `value=` can put the prefix back: one is rendered after parsing, the other
  replaces the whole tag;
- the docs told operators to pull a tag the workflow never produced.

The tags now come from a `match` rule for the semver form, the ref for the
release tag itself, and a literal `latest`.

Verified by running this action revision's own `Meta` class over the workflow's
extracted `tags:` input, against its pristine source: a relay release yields
`3.6.2`, `nostream@3.6.2` and `latest`; a legacy `v3.4.1` yields `3.4.1`,
`v3.4.1` and `latest`; a website release is stopped by the job gate. The spec's
gate test evaluates the expression instead of substring-matching it, so a typo
that still contains `nostream@` now fails rather than passing.
@chappie-daemon
chappie-daemon deployed to website-preview October 23, 2026 21:48 — with GitHub Actions Active
Comment thread docs/CI-MIGRATION.md
Comment on lines +26 to +27
such as `ghcr.io/cameri/nostream:latest` or pinned release tags (e.g. `ghcr.io/cameri/nostream:nostream@3.6.2`,
published as-is from the release tag, or the bare `ghcr.io/cameri/nostream:3.6.2`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Pinned image example cannot work

ghcr.io/cameri/nostream:nostream@3.6.2 is not a valid Docker image reference. @ separates an image name from its digest; it cannot appear inside a tag. Operators copying this example get an invalid-reference error.

Use the bare :3.6.2 tag already produced by the workflow. Correct the same promise in docs/DEPLOYMENT.md and the workflow comments.

@chappie-daemon
chappie-daemon deployed to website-preview October 24, 2026 03:04 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
website-preview — 3db1159e Deployed Oct 24, 2026 by chappie-daemon via preview #105
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.

Stop building and pushing container images outside a release

5 participants