Conversation
…ocker and GoReleaser configurations
📝 WalkthroughWalkthroughThe 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
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 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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.ymlto usedockers-v2with 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
TARGETPLATFORMfor goreleaser v2 compatibility - Updates GitHub workflows to pin goreleaser to
~> v2and 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 | |||
There was a problem hiding this comment.
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.
| ARG ARCH=amd64 |
| 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 | ||
|
|
There was a problem hiding this comment.
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.
| - "{{ 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" |
There was a problem hiding this comment.
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.
| - "{{ 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" |
| dockers_v2: | ||
| - images: | ||
| - "creativeprojects/imap" | ||
| - "ghcr.io/creativeprojects/imap" |
There was a problem hiding this comment.
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.
| - "ghcr.io/creativeprojects/imap" |
Use new
dockers-v2fromgoreleaserSummary by CodeRabbit
Release Notes