Skip to content

chore: goreleaser#4

Merged
creativeprojects merged 1 commit intomainfrom
goreleaser-dockers-v2
Feb 15, 2026
Merged

chore: goreleaser#4
creativeprojects merged 1 commit intomainfrom
goreleaser-dockers-v2

Conversation

@creativeprojects
Copy link
Owner

@creativeprojects creativeprojects commented Feb 15, 2026

Use new dockers-v2 from goreleaser

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated Go toolchain from 1.25.5 to 1.25.7 and bumped core dependencies (golang.org/x/net and related packages) for security and stability improvements
    • Enhanced multi-architecture Docker build configuration for improved platform support
    • Updated CI/CD workflows with version constraints for better build reliability

Copilot AI review requested due to automatic review settings February 15, 2026 13:28
@coderabbitai
Copy link

coderabbitai bot commented Feb 15, 2026

📝 Walkthrough

Walkthrough

The PR updates CI/CD pipelines to support manual triggering and pins dependency versions. It refactors GoReleaser Docker configuration for multi-architecture support, adds platform-aware binary selection in Dockerfile, bumps Go toolchain to 1.25.7, and updates related golang.org/x dependencies.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/docker.yml, .github/workflows/release.yml
Adds workflow_dispatch trigger to enable manual execution, and pins goreleaser-action version from latest to ~> v2 semantic version constraint in both workflows.
GoReleaser Configuration
.goreleaser-docker-only.yml
Refactors docker setup from dockers block to dockers_v2 block with consolidated image definitions, global tags, OCI labels (description, created, name, title, revision, version, source), and platforms list (linux/amd64, linux/arm64). Removes per-arch image_templates and docker_manifests sections.
Build Process
build/Dockerfile, Makefile
Dockerfile adds TARGETPLATFORM build argument for platform-specific binary selection. Makefile goreleaser installation now requests tar.gz asset and enables upgrade-only behavior.
Dependencies
go.mod
Bumps Go toolchain from 1.25.5 to 1.25.7. Updates golang.org/x/net (v0.48.0 → v0.50.0) and indirect golang.org/x packages (crypto, sys, term, text).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Workflows now dispatch with a gentle tap,
GoReleaser v2 pins to close the gap,
Docker builds dance on ARM and x86 stage,
Dependencies updated, golang takes the page!
Multi-arch magic in every release!

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: goreleaser' is vague and generic, referring only to the tool name without specifying the actual change—adopting dockers-v2 feature—making it unclear what the pull request accomplishes. Consider a more descriptive title like 'chore: migrate to goreleaser dockers-v2' or 'chore: update goreleaser configuration for multi-arch docker builds' to clarify the specific change.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch goreleaser-dockers-v2

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
build/Dockerfile (1)

5-8: ARG ARCH=amd64 is now unused; consider removing it.

After switching the COPY to use $TARGETPLATFORM, the ARCH build arg on line 5 is dead code. Additionally, TARGETPLATFORM has no default — this is fine when built via goreleaser's dockers_v2 (BuildKit sets it automatically), but a standalone docker build without --platform would produce an empty path in the COPY, causing a build failure.

Consider either removing ARCH and optionally giving TARGETPLATFORM a sensible default, or documenting that this Dockerfile is only intended to be invoked via goreleaser.

Suggested cleanup
-ARG ARCH=amd64
-ARG TARGETPLATFORM
+ARG TARGETPLATFORM=linux/amd64
 
 COPY $TARGETPLATFORM/imap /usr/bin/imap

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.35%. Comparing base (5369543) to head (528285b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #4   +/-   ##
=======================================
  Coverage   53.35%   53.35%           
=======================================
  Files          15       15           
  Lines        1612     1612           
=======================================
  Hits          860      860           
  Misses        617      617           
  Partials      135      135           
Flag Coverage Δ
unittests 53.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the Docker build configuration from goreleaser's legacy dockers format to the new dockers-v2 format, updates Go and dependency versions, and modernizes the goreleaser tooling setup.

Changes:

  • Migrates .goreleaser-docker-only.yml to use dockers-v2 with multi-platform support and adds ghcr.io as a second registry
  • Updates Go version from 1.25.5 to 1.25.7 and bumps several golang.org/x dependencies
  • Modifies Dockerfile to use TARGETPLATFORM for goreleaser v2 compatibility
  • Updates GitHub workflows to pin goreleaser to ~> v2 and adds workflow_dispatch trigger to docker.yml

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
go.mod Updates Go version to 1.25.7 and bumps golang.org/x dependencies
go.sum Adds checksums for updated golang.org/x packages
build/Dockerfile Adds TARGETPLATFORM ARG and updates COPY path for goreleaser v2 multi-platform builds
Makefile Adds flags to eget command for better goreleaser installation
.goreleaser-docker-only.yml Migrates from dockers to dockers_v2, adds ghcr.io registry, simplifies configuration with automatic multi-platform support
.github/workflows/release.yml Pins goreleaser version to ~> v2
.github/workflows/docker.yml Pins goreleaser version to ~> v2 and adds workflow_dispatch trigger for manual runs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -3,8 +3,9 @@ FROM alpine:latest
LABEL maintainer Fred <fred@gcreativeprojects.tech>

ARG ARCH=amd64
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

The ARCH build argument is defined but no longer used in the COPY command after switching to TARGETPLATFORM. Consider removing this unused ARG to keep the Dockerfile clean and avoid confusion.

Suggested change
ARG ARCH=amd64

Copilot uses AI. Check for mistakes.
Comment on lines +20 to 42
dockers_v2:
- images:
- "creativeprojects/imap"
- "ghcr.io/creativeprojects/imap"
dockerfile: build/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/amd64"
- "--build-arg=ARCH=amd64"

- image_templates:
- "creativeprojects/imap:latest-arm64v8"
- "creativeprojects/imap:{{ .RawVersion }}-arm64v8"
ids:
- imap_targz
use: buildx
goos: linux
goarch: arm64
dockerfile: build/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm64/v8"
- "--build-arg=ARCH=arm64"

docker_manifests:
- name_template: creativeprojects/imap:{{ .RawVersion }}
image_templates:
- creativeprojects/imap:{{ .RawVersion }}-amd64
- creativeprojects/imap:{{ .RawVersion }}-arm64v8

- name_template: creativeprojects/imap:latest
image_templates:
- creativeprojects/imap:latest-amd64
- creativeprojects/imap:latest-arm64v8
tags:
- "{{ .RawVersion }}"
- "{{ if .IsNightly }}nightly{{ end }}"
- "{{ if not .IsNightly }}latest{{ end }}"
labels:
"org.opencontainers.image.description": "IMAP tools: backup, copy, move your emails between servers and locally"
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.name": "{{.ProjectName}}"
"org.opencontainers.image.title": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
"org.opencontainers.image.source": "{{.GitURL}}"
platforms:
- linux/amd64
- linux/arm64

Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

The PR description mentions using new dockers-v2 from goreleaser, but only .goreleaser-docker-only.yml was migrated to use dockers_v2. The main .goreleaser.yml file (lines 64-108) still uses the old dockers format with docker_manifests. For consistency and to fully adopt goreleaser v2's dockers-v2 feature, consider updating the main configuration file as well, or document why this config uses the old format while the docker-only config uses the new format.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +32
- "{{ if .IsNightly }}nightly{{ end }}"
- "{{ if not .IsNightly }}latest{{ end }}"
labels:
"org.opencontainers.image.description": "IMAP tools: backup, copy, move your emails between servers and locally"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

The conditional tag templates on lines 29-30 will produce empty string tags when the condition is false. For example, when IsNightly is false, line 29 will generate an empty tag "". While goreleaser might filter out empty tags, it's better practice to use the {{ if }}...{{ else }}...{{ end }} pattern with separate tag entries, or rely on goreleaser's built-in conditional tag logic. Consider restructuring the tags list to avoid potential empty tag values.

Suggested change
- "{{ if .IsNightly }}nightly{{ end }}"
- "{{ if not .IsNightly }}latest{{ end }}"
labels:
"org.opencontainers.image.description": "IMAP tools: backup, copy, move your emails between servers and locally"
- "{{ if .IsNightly }}nightly{{ else }}latest{{ end }}"
labels:
"org.opencontainers.image.description": "IMAP tools: backup, copy, move your emails between servers and locally"
"org.opencontainers.image.description": "IMAP tools: backup, copy, move your emails between servers and locally"

Copilot uses AI. Check for mistakes.
dockers_v2:
- images:
- "creativeprojects/imap"
- "ghcr.io/creativeprojects/imap"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

The configuration now includes pushing to GitHub Container Registry (ghcr.io/creativeprojects/imap), but neither .github/workflows/docker.yml nor .github/workflows/release.yml include a login step for ghcr.io. You need to add authentication for ghcr.io using docker/login-action, typically with the GITHUB_TOKEN that's already available in the workflow. Without this, the Docker push to ghcr.io will fail.

Suggested change
- "ghcr.io/creativeprojects/imap"

Copilot uses AI. Check for mistakes.
@creativeprojects creativeprojects merged commit e37a3e0 into main Feb 15, 2026
12 checks passed
@creativeprojects creativeprojects deleted the goreleaser-dockers-v2 branch February 17, 2026 21:05
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