Skip to content

🤖 ci: unify :main and release image builds via goreleaser#87

Open
ThomasK33 wants to merge 2 commits intomainfrom
ci/goreleaser-main-multiarch
Open

🤖 ci: unify :main and release image builds via goreleaser#87
ThomasK33 wants to merge 2 commits intomainfrom
ci/goreleaser-main-multiarch

Conversation

@ThomasK33
Copy link
Member

Summary

Unify container publishing so :main and release images are both built by GoReleaser, and enable multi-arch (linux/amd64 + linux/arm64) Docker output.

Background

Previously, the CI publish-main job manually built an amd64 binary and used docker/build-push-action, while release images were built via GoReleaser. This duplicated image logic and left :main single-arch.

Implementation

  • Updated .goreleaser.yaml:
    • Added release.disable gate for main-channel runs (GORELEASER_CHANNEL=main) so CI can use goreleaser release without creating a GitHub release.
    • Made Docker tags channel-aware:
      • main-channel: main
      • release-channel: {{ .Version }} and latest
    • Enabled Docker platforms:
      • linux/amd64
      • linux/arm64
    • Made OCI version label channel-aware.
  • Updated .github/workflows/ci.yaml publish-main job:
    • Added fetch-depth: 0 for git metadata availability.
    • Replaced manual build + docker push steps with goreleaser/goreleaser-action.
    • Added env for main-channel execution:
      • GORELEASER_CURRENT_TAG=v0.0.0-main
      • GORELEASER_CHANNEL=main
    • Included .goreleaser.yaml in publish path filtering.

Validation

  • make verify-vendor
  • make test
  • make build
  • make lint
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.10
  • go run github.com/goreleaser/goreleaser/v2@v2.13.1 check
  • GORELEASER_CHANNEL=main go run github.com/goreleaser/goreleaser/v2@v2.13.1 check
  • GORELEASER_CHANNEL=main GORELEASER_CURRENT_TAG=v0.0.0-main go run github.com/goreleaser/goreleaser/v2@v2.13.1 release --clean --skip=announce,publish,docker,validate

Risks

  • Main-channel GoReleaser execution depends on the synthetic tag env (GORELEASER_CURRENT_TAG). If altered/removed, the main publish job may fail on untagged commits.
  • Multi-arch image publishing now depends on Buildx/QEMU behavior through GoReleaser integration in CI.

Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $0.61

Route the :main GHCR publish job through GoReleaser so it shares the
same image pipeline as release builds, and enable linux/arm64 alongside
linux/amd64 in GoReleaser Docker outputs.

---

_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.61`_

<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.61 -->
@ThomasK33
Copy link
Member Author

@codex review

Please review this change set for CI and GoReleaser unification. Focus areas:

  • correctness of channel-aware GoReleaser tagging/disable logic,
  • safety of publish-main workflow changes,
  • regressions in release vs main image publishing behavior.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 738b747365

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Avoid rendering an empty Docker tag in main-channel GoReleaser runs by
using separate dockers_v2 entries with channel-specific disable rules.
This keeps `:main` and release tags explicit and always non-empty.

---

_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.61`_

<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.61 -->
@ThomasK33
Copy link
Member Author

@codex review

Addressed your feedback by splitting dockers_v2 into channel-specific entries with explicit non-empty tags:

  • main channel publishes only main
  • release channel publishes {{ .Version }} and latest

Please re-review.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant