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:
|
jobs:
|
||||||
release:
|
release:
|
||||||
uses: lukaszraczylo/shared-actions/.github/workflows/go-release.yaml@main
|
uses: lukaszraczylo/shared-actions/.github/workflows/go-release-cgo.yaml@main
|
||||||
with:
|
with:
|
||||||
go-version: "1.25"
|
go-version: "1.25"
|
||||||
docker-enabled: true
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
benchmark:
|
benchmark:
|
||||||
|
|||||||
+27
-24
@@ -79,14 +79,15 @@ release:
|
|||||||
dockers_v2:
|
dockers_v2:
|
||||||
# 1. Application Engine - Main GoHoarder server
|
# 1. Application Engine - Main GoHoarder server
|
||||||
- id: gohoarder-server
|
- id: gohoarder-server
|
||||||
use: buildx
|
|
||||||
images:
|
images:
|
||||||
- ghcr.io/lukaszraczylo/gohoarder-server
|
- ghcr.io/lukaszraczylo/gohoarder-server
|
||||||
build_flag_templates:
|
platforms:
|
||||||
- "--platform=linux/amd64,linux/arm64"
|
- linux/amd64
|
||||||
- "--build-arg=VERSION={{ .Version }}"
|
- linux/arm64
|
||||||
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
|
build_args:
|
||||||
- "--build-arg=BUILD_TIME={{ .Date }}"
|
VERSION: "{{ .Version }}"
|
||||||
|
GIT_COMMIT: "{{ .ShortCommit }}"
|
||||||
|
BUILD_TIME: "{{ .Date }}"
|
||||||
tags:
|
tags:
|
||||||
- "{{ .Version }}"
|
- "{{ .Version }}"
|
||||||
- latest
|
- latest
|
||||||
@@ -104,11 +105,11 @@ dockers_v2:
|
|||||||
|
|
||||||
# 2. Website - Frontend Dashboard
|
# 2. Website - Frontend Dashboard
|
||||||
- id: gohoarder-frontend
|
- id: gohoarder-frontend
|
||||||
use: buildx
|
|
||||||
images:
|
images:
|
||||||
- ghcr.io/lukaszraczylo/gohoarder-frontend
|
- ghcr.io/lukaszraczylo/gohoarder-frontend
|
||||||
build_flag_templates:
|
platforms:
|
||||||
- "--platform=linux/amd64,linux/arm64"
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
tags:
|
tags:
|
||||||
- "{{ .Version }}"
|
- "{{ .Version }}"
|
||||||
- latest
|
- latest
|
||||||
@@ -126,14 +127,15 @@ dockers_v2:
|
|||||||
|
|
||||||
# 3. Scanning Engine - Background scanner worker
|
# 3. Scanning Engine - Background scanner worker
|
||||||
- id: gohoarder-scanner
|
- id: gohoarder-scanner
|
||||||
use: buildx
|
|
||||||
images:
|
images:
|
||||||
- ghcr.io/lukaszraczylo/gohoarder-scanner
|
- ghcr.io/lukaszraczylo/gohoarder-scanner
|
||||||
build_flag_templates:
|
platforms:
|
||||||
- "--platform=linux/amd64,linux/arm64"
|
- linux/amd64
|
||||||
- "--build-arg=VERSION={{ .Version }}"
|
- linux/arm64
|
||||||
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
|
build_args:
|
||||||
- "--build-arg=BUILD_TIME={{ .Date }}"
|
VERSION: "{{ .Version }}"
|
||||||
|
GIT_COMMIT: "{{ .ShortCommit }}"
|
||||||
|
BUILD_TIME: "{{ .Date }}"
|
||||||
tags:
|
tags:
|
||||||
- "{{ .Version }}"
|
- "{{ .Version }}"
|
||||||
- latest
|
- latest
|
||||||
@@ -151,11 +153,11 @@ dockers_v2:
|
|||||||
|
|
||||||
# 4. Gateway - Nginx reverse proxy for unified deployment
|
# 4. Gateway - Nginx reverse proxy for unified deployment
|
||||||
- id: gohoarder-gateway
|
- id: gohoarder-gateway
|
||||||
use: buildx
|
|
||||||
images:
|
images:
|
||||||
- ghcr.io/lukaszraczylo/gohoarder-gateway
|
- ghcr.io/lukaszraczylo/gohoarder-gateway
|
||||||
build_flag_templates:
|
platforms:
|
||||||
- "--platform=linux/amd64,linux/arm64"
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
tags:
|
tags:
|
||||||
- "{{ .Version }}"
|
- "{{ .Version }}"
|
||||||
- latest
|
- latest
|
||||||
@@ -171,14 +173,15 @@ dockers_v2:
|
|||||||
|
|
||||||
# 5. Migration Engine - Database migration tool
|
# 5. Migration Engine - Database migration tool
|
||||||
- id: gohoarder-migrate
|
- id: gohoarder-migrate
|
||||||
use: buildx
|
|
||||||
images:
|
images:
|
||||||
- ghcr.io/lukaszraczylo/gohoarder-migrate
|
- ghcr.io/lukaszraczylo/gohoarder-migrate
|
||||||
build_flag_templates:
|
platforms:
|
||||||
- "--platform=linux/amd64,linux/arm64"
|
- linux/amd64
|
||||||
- "--build-arg=VERSION={{ .Version }}"
|
- linux/arm64
|
||||||
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
|
build_args:
|
||||||
- "--build-arg=BUILD_TIME={{ .Date }}"
|
VERSION: "{{ .Version }}"
|
||||||
|
GIT_COMMIT: "{{ .ShortCommit }}"
|
||||||
|
BUILD_TIME: "{{ .Date }}"
|
||||||
tags:
|
tags:
|
||||||
- "{{ .Version }}"
|
- "{{ .Version }}"
|
||||||
- latest
|
- latest
|
||||||
|
|||||||
Reference in New Issue
Block a user