chore: fix goreleaser configurations using new dockers_v2#5
chore: fix goreleaser configurations using new dockers_v2#5creativeprojects merged 4 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughThe changes update CI/CD workflows and GoReleaser configuration to authenticate with GitHub Container Registry (ghcr.io) and modernize Docker image configuration using dockers_v2. The Dockerfile ARG is simplified. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
This PR migrates the GoReleaser Docker configuration from the deprecated dockers format to the newer dockers_v2 format, consolidating the multi-platform Docker build setup and adding GitHub Container Registry as a second publishing target.
Changes:
- Migrated from separate
dockersanddocker_manifestssections to unifieddockers_v2configuration in.goreleaser.yml - Removed unused
ARCHbuild argument from Dockerfile (onlyTARGETPLATFORMis used) - Added GitHub Container Registry (ghcr.io) login steps to release and Docker workflows
- Added GoReleaser configuration validation to the build workflow
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.goreleaser.yml |
Migrated from dockers + docker_manifests to dockers_v2, added ghcr.io as publishing target, simplified multi-platform build configuration |
build/Dockerfile |
Removed unused ARCH argument (only TARGETPLATFORM is actually used in the COPY command) |
.github/workflows/release.yml |
Added GitHub Container Registry authentication for publishing images |
.github/workflows/docker.yml |
Added GitHub Container Registry authentication for publishing images |
.github/workflows/build.yaml |
Fixed indentation and added GoReleaser configuration validation step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/docker.yml (1)
51-57:⚠️ Potential issue | 🔴 CriticalThe
.goreleaser-docker-only.ymlconfig file does not exist in the repository.The workflow (line 55) references
--config .goreleaser-docker-only.yml, but this file is not present. Either this file needs to be created as part of this PR, or the workflow configuration path is incorrect. Without this file, the workflow will fail at runtime.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/docker.yml around lines 51 - 57, The workflow references a non-existent GoReleaser config file in the goreleaser step (args: release --clean --config .goreleaser-docker-only.yml); either add the missing .goreleaser-docker-only.yml config to the repo with the intended Docker-only release settings, or update the goreleaser action args to point to an existing config (or remove the --config flag) so the step can run; locate the goreleaser invocation in the GitHub Actions workflow (the "Run GoReleaser" job using goreleaser/goreleaser-action@v6) and make the appropriate change..github/workflows/release.yml (1)
10-50:⚠️ Potential issue | 🔴 CriticalAdd
Set up QEMUstep to enable multi-platform Docker builds.The
.goreleaser.ymlspecifiesplatforms: [linux/amd64, linux/arm64]underdockers_v2, but this workflow lacks the QEMU emulation setup required to buildlinux/arm64images on theubuntu-latest(amd64) runner. Thedocker.ymlworkflow correctly includesdocker/setup-qemu-action@v3(line 31), butrelease.ymldoes not.Proposed fix: add QEMU setup before GoReleaser
+ - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Login to DockerHub uses: docker/login-action@v3🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release.yml around lines 10 - 50, The workflow is missing QEMU setup so arm64 images can be built on the ubuntu-latest runner; add a step using docker/setup-qemu-action@v3 (e.g., a new step named "Set up QEMU") before the "Run GoReleaser" step in the goreleaser job to enable multi-platform builds, mirroring the docker/setup-qemu-action@v3 usage from the other workflow and ensuring it runs prior to the goreleaser/goreleaser-action invocation.
🧹 Nitpick comments (1)
.github/workflows/build.yaml (1)
51-57: GoReleaser check runs on all OS matrix entries unnecessarily.This config validation step runs on
ubuntu-latest,windows-latest, andmacos-latest. Since it's purely a YAML/config lint, it only needs to run once. Consider either extracting it into a separate job or adding a condition likeif: matrix.os == 'ubuntu-latest'.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build.yaml around lines 51 - 57, The "Check GoReleaser configurations" step currently runs for every matrix OS; restrict it to run only once by either moving it into its own job (e.g., create a new job named goreleaser-check that runs on ubuntu-latest and contains the existing uses: goreleaser/goreleaser-action@v6 step) or add a conditional to the existing step like if: matrix.os == 'ubuntu-latest' so the "Check GoReleaser configurations" step only executes on the ubuntu runner.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In @.github/workflows/docker.yml:
- Around line 51-57: The workflow references a non-existent GoReleaser config
file in the goreleaser step (args: release --clean --config
.goreleaser-docker-only.yml); either add the missing .goreleaser-docker-only.yml
config to the repo with the intended Docker-only release settings, or update the
goreleaser action args to point to an existing config (or remove the --config
flag) so the step can run; locate the goreleaser invocation in the GitHub
Actions workflow (the "Run GoReleaser" job using
goreleaser/goreleaser-action@v6) and make the appropriate change.
In @.github/workflows/release.yml:
- Around line 10-50: The workflow is missing QEMU setup so arm64 images can be
built on the ubuntu-latest runner; add a step using docker/setup-qemu-action@v3
(e.g., a new step named "Set up QEMU") before the "Run GoReleaser" step in the
goreleaser job to enable multi-platform builds, mirroring the
docker/setup-qemu-action@v3 usage from the other workflow and ensuring it runs
prior to the goreleaser/goreleaser-action invocation.
---
Nitpick comments:
In @.github/workflows/build.yaml:
- Around line 51-57: The "Check GoReleaser configurations" step currently runs
for every matrix OS; restrict it to run only once by either moving it into its
own job (e.g., create a new job named goreleaser-check that runs on
ubuntu-latest and contains the existing uses: goreleaser/goreleaser-action@v6
step) or add a conditional to the existing step like if: matrix.os ==
'ubuntu-latest' so the "Check GoReleaser configurations" step only executes on
the ubuntu runner.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
=======================================
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:
|
Summary by CodeRabbit