mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-06-05 22:53:53 +00:00
fix: correct GoReleaser Pro configuration for CGO and Docker builds
Problem: - Used incorrect field names (use: buildx, build_flag_templates) not supported in GoReleaser v2.13.2 - GitHub Actions workflow using non-CGO release workflow - Docker builds failing due to invalid configuration Solution: - Updated dockers_v2 configuration with correct field names: - Removed unsupported `use: buildx` field - Changed `build_flag_templates` to `build_args` (map format) - Kept `platforms` for multi-arch support (linux/amd64, linux/arm64) - Updated GitHub Actions workflow to use go-release-cgo.yaml for CGO support - Build args now passed correctly to Docker builds for version info Changes: - .goreleaser.yaml: Fixed all Docker image configurations - .github/workflows/release.yaml: Changed to go-release-cgo.yaml workflow Validation: - goreleaser check: PASSED ✓ - Configuration validated with GoReleaser Pro v2.13.2 References: - GoReleaser dockers_v2 docs: https://goreleaser.com/customization/dockers_v2/
This commit is contained in:
@@ -20,10 +20,9 @@ permissions:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
uses: lukaszraczylo/shared-actions/.github/workflows/go-release.yaml@main
|
||||
uses: lukaszraczylo/shared-actions/.github/workflows/go-release-cgo.yaml@main
|
||||
with:
|
||||
go-version: "1.25"
|
||||
docker-enabled: true
|
||||
secrets: inherit
|
||||
|
||||
benchmark:
|
||||
|
||||
+27
-24
@@ -79,14 +79,15 @@ release:
|
||||
dockers_v2:
|
||||
# 1. Application Engine - Main GoHoarder server
|
||||
- id: gohoarder-server
|
||||
use: buildx
|
||||
images:
|
||||
- ghcr.io/lukaszraczylo/gohoarder-server
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64,linux/arm64"
|
||||
- "--build-arg=VERSION={{ .Version }}"
|
||||
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
|
||||
- "--build-arg=BUILD_TIME={{ .Date }}"
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
build_args:
|
||||
VERSION: "{{ .Version }}"
|
||||
GIT_COMMIT: "{{ .ShortCommit }}"
|
||||
BUILD_TIME: "{{ .Date }}"
|
||||
tags:
|
||||
- "{{ .Version }}"
|
||||
- latest
|
||||
@@ -104,11 +105,11 @@ dockers_v2:
|
||||
|
||||
# 2. Website - Frontend Dashboard
|
||||
- id: gohoarder-frontend
|
||||
use: buildx
|
||||
images:
|
||||
- ghcr.io/lukaszraczylo/gohoarder-frontend
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64,linux/arm64"
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
tags:
|
||||
- "{{ .Version }}"
|
||||
- latest
|
||||
@@ -126,14 +127,15 @@ dockers_v2:
|
||||
|
||||
# 3. Scanning Engine - Background scanner worker
|
||||
- id: gohoarder-scanner
|
||||
use: buildx
|
||||
images:
|
||||
- ghcr.io/lukaszraczylo/gohoarder-scanner
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64,linux/arm64"
|
||||
- "--build-arg=VERSION={{ .Version }}"
|
||||
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
|
||||
- "--build-arg=BUILD_TIME={{ .Date }}"
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
build_args:
|
||||
VERSION: "{{ .Version }}"
|
||||
GIT_COMMIT: "{{ .ShortCommit }}"
|
||||
BUILD_TIME: "{{ .Date }}"
|
||||
tags:
|
||||
- "{{ .Version }}"
|
||||
- latest
|
||||
@@ -151,11 +153,11 @@ dockers_v2:
|
||||
|
||||
# 4. Gateway - Nginx reverse proxy for unified deployment
|
||||
- id: gohoarder-gateway
|
||||
use: buildx
|
||||
images:
|
||||
- ghcr.io/lukaszraczylo/gohoarder-gateway
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64,linux/arm64"
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
tags:
|
||||
- "{{ .Version }}"
|
||||
- latest
|
||||
@@ -171,14 +173,15 @@ dockers_v2:
|
||||
|
||||
# 5. Migration Engine - Database migration tool
|
||||
- id: gohoarder-migrate
|
||||
use: buildx
|
||||
images:
|
||||
- ghcr.io/lukaszraczylo/gohoarder-migrate
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64,linux/arm64"
|
||||
- "--build-arg=VERSION={{ .Version }}"
|
||||
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
|
||||
- "--build-arg=BUILD_TIME={{ .Date }}"
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
build_args:
|
||||
VERSION: "{{ .Version }}"
|
||||
GIT_COMMIT: "{{ .ShortCommit }}"
|
||||
BUILD_TIME: "{{ .Date }}"
|
||||
tags:
|
||||
- "{{ .Version }}"
|
||||
- latest
|
||||
|
||||
Reference in New Issue
Block a user