Repository navigation
ci(release): stop publishing on main and make the deploy path follow releases #944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
78661a8
fix(ci): stop building and pushing container images outside a release…
avantikonde 0ebddd6
ci(release): make the deploy path follow releases, not main
chappie-daemon d55166d
ci(release): publish tags for the releases that actually exist (#881)
chappie-daemon 3db1159
Merge branch 'main' into fix/stop-publishing-container-outside-release
chappie-daemon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| "nostream": patch | ||
| "nostream-website": patch | ||
| --- | ||
|
|
||
| fix(ci): stop building and pushing container images outside a release | ||
|
|
||
| Remove the container publish job from checks.yml so pushes to main no longer publish | ||
| images to GHCR. Container image builds and pushes are now restricted exclusively to | ||
| release.yml on published releases. Update deployment documentation and reference compose | ||
| stacks to target the released image tag (:latest) instead of :main. |
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,28 @@ | ||
| # CI container publishing migration | ||
|
|
||
| Container publishing is now part of `.github/workflows/checks.yml`. | ||
| Container publishing is now restricted exclusively to official releases via `.github/workflows/release.yml`. | ||
|
|
||
| ## What changed | ||
|
|
||
| The standalone `publish-container-image.yml` workflow, which listened for a | ||
| completed `workflow_run`, was removed. `checks.yml` now contains | ||
| `publish-container-image` as its final job. | ||
| The `publish-container-image` job was removed from `.github/workflows/checks.yml`. Container images | ||
| are no longer built or published on pushes to `main`. | ||
|
|
||
| ## Why | ||
|
|
||
| Keeping publishing in the workflow that performed the checks makes its | ||
| dependencies explicit. It avoids the timing and event-context ambiguity of a | ||
| separate `workflow_run`, which could be triggered by an external pull-request | ||
| run. | ||
| Publishing images from unreleased commits on `main` caused the `main` tag (and per-commit SHA tags) | ||
| to serve as moving targets of unreleased code, creating drift between published releases and images | ||
| pulled in production. Publishing is now aligned strictly with official GitHub releases. | ||
|
|
||
| ## New behavior | ||
|
|
||
| On successful pushes to `main`, CI runs linting, the build check, unit tests, | ||
| integration tests, and post-test reporting before publishing the container | ||
| image. The publish job cannot run for pull requests or manual workflow runs. | ||
| Container images are published only by `.github/workflows/release.yml` when an official relay release | ||
| is published. Changesets tags a relay release `nostream@X.Y.Z`, so that prefix is what the workflow | ||
| matches; the `vX.Y.Z` form from before the changesets migration is still accepted. Pushes to `main` and pull requests run verification checks without | ||
| publishing any container images. | ||
|
|
||
| ## Action required | ||
|
|
||
| None. Developers and deployment users receive the same `main` and per-commit | ||
| container image tags automatically after CI succeeds. | ||
| Deployments tracking `ghcr.io/cameri/nostream:main` should be updated to track released versions, | ||
| 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`). | ||
| See [`deploy/README.md`](../deploy/README.md) and [`docs/DEPLOY-RUNBOOK.md`](DEPLOY-RUNBOOK.md). | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,25 @@ | ||
| # Deployment and container publishing | ||
|
|
||
| The `ghcr.io/cameri/nostream` container image is published automatically by the | ||
| CI Checks workflow after a successful push to `main`. The workflow publishes | ||
| both the `main` tag and a `sha-<commit>` tag. | ||
| Release workflow (`release.yml`) whenever an official GitHub release is published. | ||
| For release `nostream@3.6.2` the workflow publishes three tags: `latest`, the release tag itself | ||
| (`nostream@3.6.2`, which is what a host pins), and the bare version (`3.6.2`). | ||
|
|
||
| Publishing is the final stage of the CI dependency chain: | ||
| Publishing is triggered only on published relay releases — the changesets tag `nostream@X.Y.Z`, or the | ||
| `vX.Y.Z` form used before the changesets migration. A `nostream-website@X.Y.Z` release publishes no | ||
| image: | ||
|
|
||
| ```text | ||
| changes → lint and build-check → unit and integration tests → post-tests → publish-container-image | ||
| release: published (nostream@X.Y.Z) | ||
| → build-and-push-image | ||
| → ghcr.io/cameri/nostream:{nostream@X.Y.Z, X.Y.Z, latest} | ||
| ``` | ||
|
|
||
| The publish job runs only for `refs/heads/main` and only when `post-tests` | ||
| succeeds. Pull requests and manual workflow runs do not publish images. | ||
| CI Checks (`checks.yml`) does not build or publish container images on push to | ||
| `main` or pull requests, ensuring that published images only correspond to | ||
| released versions. | ||
|
|
||
| Deployment hosts can pull the `main` image as described in | ||
| [`deploy/README.md`](../deploy/README.md). After the image is on the host, follow | ||
| Deployment hosts can pull the released image (`latest` or a specific release tag) | ||
| as described in [`deploy/README.md`](../deploy/README.md). After the image is on the host, follow | ||
| [`docs/DEPLOY-RUNBOOK.md`](DEPLOY-RUNBOOK.md) to migrate and recreate the relay. | ||
| There is no separate manual image publishing step. |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ghcr.io/cameri/nostream:nostream@3.6.2is 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.2tag already produced by the workflow. Correct the same promise indocs/DEPLOYMENT.mdand the workflow comments.