Compare commits

..
11 Commits
Author SHA1 Message Date
lukaszraczylo 0a2c5f6c2c fix: update Dockerfiles to use Go 1.25 to match go.mod requirement
go.mod requires go >= 1.25.5 but Dockerfiles were using golang:1.23-alpine.
Updated all Go-based Dockerfiles to use golang:1.25-alpine.

Affected files:
- Dockerfile.server
- Dockerfile.scanner
- Dockerfile.migrate

This fixes the build error:
"go: go.mod requires go >= 1.25.5 (running go 1.23.12; GOTOOLCHAIN=local)"
2026-01-03 23:50:55 +00:00
lukaszraczylo ae632a3dd7 fix: add extra_files to copy source directories into Docker build context
GoReleaser creates a temporary build context with only binaries, but our
Dockerfiles are multi-stage builds that need the full source code to
compile. Added extra_files to copy necessary directories.

Files copied per image:
- gohoarder-server: go.mod, go.sum, cmd, pkg, internal, config
- gohoarder-scanner: go.mod, go.sum, cmd, pkg, internal, config
- gohoarder-migrate: go.mod, go.sum, cmd, pkg, internal, migrations
- gohoarder-frontend: frontend/ directory (Node.js source)
- gohoarder-gateway: no extra files needed (static config)

This fixes the build context error:
"Seems like you tried to copy a file that is not available in the
build context."
2026-01-03 23:41:13 +00:00
lukaszraczylo c212077478 refactor: rebuild GoReleaser configuration with dockers_v2
Completely rebuilt GoReleaser Pro configuration using modern dockers_v2
syntax to fix Docker build issues. All Dockerfiles are self-contained
multi-stage builds that compile their own binaries.

Key changes:
- Migrated from deprecated 'dockers' to 'dockers_v2'
- Removed 'use: buildx' (implicit in dockers_v2)
- Changed 'image_templates' to 'images' + 'tags' structure
- Replaced 'build_flag_templates' with 'build_args' + 'flags'
- Removed incorrect 'extra_files' that caused build context errors
- Added 'platforms' for multi-arch support (linux/amd64, linux/arm64)

Binary builds:
- gohoarder: darwin/arm64, linux/amd64 (CGO enabled)
- migrate: darwin/arm64, linux/amd64 (CGO enabled)
- linux/arm64 binaries skipped (Docker provides multi-arch)

Docker images (all self-building):
- gohoarder-server (Go multi-stage build)
- gohoarder-scanner (Go multi-stage build)
- gohoarder-migrate (Go multi-stage build)
- gohoarder-frontend (Node.js multi-stage build)
- gohoarder-gateway (Nginx static config)
2026-01-03 23:34:10 +00:00
lukaszraczylo af5e08a864 fix: disable SBOM attestations for Docker builds
Docker SBOM attestations require docker-container driver which is not
available in the default Docker driver used by GoReleaser. Disabled
SBOM generation for all Docker images to prevent build failures.

Error fixed:
- "Attestation is not supported for the docker driver"

Applied to all Docker images:
- gohoarder-server
- gohoarder-frontend
- gohoarder-scanner
- gohoarder-gateway
- gohoarder-migrate
2026-01-03 23:14:27 +00:00
lukaszraczylo adc7388ee1 fix: revert to using shared workflow (now fixed upstream)
Removed local workflow copy and reverted to using the shared workflow
from lukaszraczylo/shared-actions@main, which now has the proper
if condition to prevent the release job from being skipped.
2026-01-03 23:00:08 +00:00
lukaszraczylo 116ba9b006 fix: add missing condition to release job to prevent skipping
Problem:
- Release job (merge phase) was being skipped even though all builds succeeded
- The shared workflow's release job has `needs: [version, build]` but no `if` condition
- Without `if: always()`, GitHub Actions skips the job if dependencies have non-success status
- Frontend job being skipped caused downstream effects

Solution:
- Created local copy of go-release-cgo.yaml workflow
- Added explicit condition to release job:
  if: |
    always() &&
    needs.version.result == 'success' &&
    needs.build.result == 'success'
- Updated release.yaml to use local workflow instead of remote

This ensures the release/merge phase runs as long as version and build jobs succeed,
regardless of optional jobs like frontend being skipped.

Note: This is a workaround until the fix is merged upstream in shared-actions repo.
2026-01-03 22:57:21 +00:00
lukaszraczylo 03860dcb49 fix: skip linux/arm64 binary builds to avoid CGO cross-compilation
Problem:
- linux_amd64 runner was trying to build BOTH:
  - linux/amd64 (native - OK)
  - linux/arm64 (cross-compile with CGO - FAILS)
- Error: gcc_arm64.S assembler errors when cross-compiling ARM64 on x86_64
- Workflow default platforms only include linux/amd64, not linux/arm64

Solution:
- Added linux/arm64 to ignore list in both builds
- Only build linux/amd64 binaries (native compilation on ubuntu-latest)
- Docker images still provide linux/arm64 via multi-stage builds
- Users get ARM64 support through Docker, not standalone binaries

Build matrix now:
-  darwin/arm64 (macOS Apple Silicon) - native on macos-latest
-  linux/amd64 (Linux x86_64) - native on ubuntu-latest
-  linux/arm64 (skipped for binaries, available in Docker)

This eliminates CGO cross-compilation while maintaining full platform support
via Docker multi-arch images.
2026-01-03 22:47:56 +00:00
lukaszraczylo a1ec05b210 fix: add workflow-prepare.sh for CGO SQLite dependencies
Problem:
- CGO builds failing in CI with "cannot find sqlite3.h"
- go-release-cgo.yaml workflow looks for workflow-prepare.sh to install deps
- Script was missing, causing build failures

Solution:
- Created workflow-prepare.sh to install SQLite development headers
- Platform-specific installation:
  - Linux (Ubuntu/Debian): libsqlite3-dev via apt-get
  - Linux (RHEL/CentOS): sqlite-devel via yum
  - Linux (Alpine): sqlite-dev via apk
  - macOS: sqlite3 via Homebrew (if needed)
  - Windows: Downloads SQLite amalgamation, sets CGO_CFLAGS/CGO_LDFLAGS
- Includes verification step to confirm SQLite availability

This script is automatically called by the shared GitHub Actions workflow
before running GoReleaser builds with CGO_ENABLED=1.
2026-01-03 22:41:00 +00:00
lukaszraczylo dc1d507a20 fix: enable binary builds for proper GitHub releases and Helm charts
Problem:
- With builds: skip: true, no artifacts were created
- GoReleaser wasn't creating GitHub releases or tags
- Helm chart workflow wasn't triggered (depends on tags)
- No downloadable binaries for users

Solution:
- Enabled builds for both gohoarder and migrate binaries
- CGO_ENABLED=1 for SQLite support
- Added fts5 tag for full-text search
- Builds run natively per platform in split/merge workflow:
  - darwin/arm64 (Apple Silicon Macs)
  - linux/amd64 (x86_64 Linux)
  - linux/arm64 (ARM64 Linux)
- Ignored darwin/amd64 (Intel Macs) to limit build matrix

How it works:
1. Split phase: Each platform builds natively (no cross-compilation)
2. Merge phase: Combines all artifacts, creates release, builds Docker images
3. Docker images still use multi-stage builds (independent of binaries)
4. GitHub release created with tags
5. Helm chart workflow triggered

Benefits:
- Downloadable binaries for all platforms
- Archives created automatically
- GitHub releases with proper tags
- Helm charts published
- Docker images built separately with multi-stage builds
2026-01-03 22:36:09 +00:00
lukaszraczylo 72f284f987 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/
2026-01-03 22:12:31 +00:00
lukaszraczylo ef11972274 Revert "fix: use free GoReleaser syntax for Docker builds"
This reverts commit 96f9f4a36c.
2026-01-03 22:09:06 +00:00
6 changed files with 234 additions and 242 deletions
+1 -2
View File
@@ -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:
+152 -237
View File
@@ -7,19 +7,62 @@ project_name: gohoarder
before:
hooks:
- go mod tidy
# Generate semantic version if not provided via git tag
# This script can be used by CI/CD to inject custom versions
# Usage: export GORELEASER_CURRENT_TAG=$(./script/generate-version.sh)
# - ./script/generate-version.sh
# Build configuration
# Note: Binaries are built inside Docker containers (multi-stage builds)
# to avoid CGO cross-compilation issues. No standalone builds here.
# Binary builds for direct downloads (darwin/arm64, linux/amd64)
# Binaries use split mode to avoid CGO cross-compilation
builds:
- id: gohoarder
skip: true
main: ./cmd/gohoarder
binary: gohoarder
env:
- CGO_ENABLED=1
tags:
- fts5
flags:
- -trimpath
ldflags:
- -s -w
- -X github.com/lukaszraczylo/gohoarder/internal/version.Version={{.Version}}
- -X github.com/lukaszraczylo/gohoarder/internal/version.GitCommit={{.ShortCommit}}
- -X github.com/lukaszraczylo/gohoarder/internal/version.BuildTime={{.Date}}
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ignore:
- goos: darwin
goarch: amd64
- goos: linux
goarch: arm64 # Skip linux/arm64 binaries (Docker handles multi-arch)
- id: migrate
skip: true
main: ./cmd/migrate
binary: migrate
env:
- CGO_ENABLED=1
tags:
- fts5
flags:
- -trimpath
ldflags:
- -s -w
- -X main.Version={{.Version}}
- -X main.GitCommit={{.ShortCommit}}
- -X main.BuildTime={{.Date}}
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ignore:
- goos: darwin
goarch: amd64
- goos: linux
goarch: arm64 # Skip linux/arm64 binaries (Docker handles multi-arch)
# Archives for releases
archives:
@@ -76,94 +119,61 @@ release:
prerelease: auto
# Docker images (v2 - modern syntax)
# All Dockerfiles are self-contained multi-stage builds
# GoReleaser orchestrates buildx and passes build args
dockers_v2:
# 1. Application Engine - Main GoHoarder server
- id: gohoarder-server
images:
- ghcr.io/lukaszraczylo/gohoarder-server
goarch: amd64
build_flags:
- "--build-arg=VERSION={{ .Version }}"
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
- "--build-arg=BUILD_TIME={{ .Date }}"
- "--build-arg=TARGETOS=linux"
- "--build-arg=TARGETARCH=amd64"
tags:
- "{{ .Version }}-amd64"
- latest-amd64
- "{{ .Version }}"
- latest
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.server
labels:
org.opencontainers.image.title: GoHoarder Server
org.opencontainers.image.description: Universal package cache proxy server
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
extra_files:
- config.yaml.example
- id: gohoarder-server-arm64
images:
- ghcr.io/lukaszraczylo/gohoarder-server
goarch: arm64
build_flags:
- "--build-arg=VERSION={{ .Version }}"
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
- "--build-arg=BUILD_TIME={{ .Date }}"
- "--build-arg=TARGETOS=linux"
- "--build-arg=TARGETARCH=arm64"
tags:
- "{{ .Version }}-arm64"
- latest-arm64
dockerfile: Dockerfile.server
labels:
org.opencontainers.image.title: GoHoarder Server
org.opencontainers.image.description: Universal package cache proxy server
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
build_args:
VERSION: "{{ .Version }}"
GIT_COMMIT: "{{ .ShortCommit }}"
BUILD_TIME: "{{ .Date }}"
flags:
- "--pull"
- "--label=org.opencontainers.image.title=GoHoarder Server"
- "--label=org.opencontainers.image.description=Universal package cache proxy server"
- "--label=org.opencontainers.image.url=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.source=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
extra_files:
- go.mod
- go.sum
- cmd
- pkg
- internal
- config.yaml.example
# 2. Website - Frontend Dashboard
- id: gohoarder-frontend
images:
- ghcr.io/lukaszraczylo/gohoarder-frontend
goarch: amd64
tags:
- "{{ .Version }}-amd64"
- latest-amd64
- "{{ .Version }}"
- latest
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.frontend
labels:
org.opencontainers.image.title: GoHoarder Frontend
org.opencontainers.image.description: GoHoarder web dashboard
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
extra_files:
- frontend
- id: gohoarder-frontend-arm64
images:
- ghcr.io/lukaszraczylo/gohoarder-frontend
goarch: arm64
tags:
- "{{ .Version }}-arm64"
- latest-arm64
dockerfile: Dockerfile.frontend
labels:
org.opencontainers.image.title: GoHoarder Frontend
org.opencontainers.image.description: GoHoarder web dashboard
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
flags:
- "--pull"
- "--label=org.opencontainers.image.title=GoHoarder Frontend"
- "--label=org.opencontainers.image.description=GoHoarder web dashboard"
- "--label=org.opencontainers.image.url=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.source=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
extra_files:
- frontend
@@ -171,134 +181,86 @@ dockers_v2:
- id: gohoarder-scanner
images:
- ghcr.io/lukaszraczylo/gohoarder-scanner
goarch: amd64
build_flags:
- "--build-arg=VERSION={{ .Version }}"
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
- "--build-arg=BUILD_TIME={{ .Date }}"
- "--build-arg=TARGETOS=linux"
- "--build-arg=TARGETARCH=amd64"
tags:
- "{{ .Version }}-amd64"
- latest-amd64
- "{{ .Version }}"
- latest
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.scanner
labels:
org.opencontainers.image.title: GoHoarder Scanner
org.opencontainers.image.description: GoHoarder vulnerability scanning engine
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
extra_files:
- config.yaml.example
- id: gohoarder-scanner-arm64
images:
- ghcr.io/lukaszraczylo/gohoarder-scanner
goarch: arm64
build_flags:
- "--build-arg=VERSION={{ .Version }}"
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
- "--build-arg=BUILD_TIME={{ .Date }}"
- "--build-arg=TARGETOS=linux"
- "--build-arg=TARGETARCH=arm64"
tags:
- "{{ .Version }}-arm64"
- latest-arm64
dockerfile: Dockerfile.scanner
labels:
org.opencontainers.image.title: GoHoarder Scanner
org.opencontainers.image.description: GoHoarder vulnerability scanning engine
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
build_args:
VERSION: "{{ .Version }}"
GIT_COMMIT: "{{ .ShortCommit }}"
BUILD_TIME: "{{ .Date }}"
flags:
- "--pull"
- "--label=org.opencontainers.image.title=GoHoarder Scanner"
- "--label=org.opencontainers.image.description=GoHoarder vulnerability scanning engine"
- "--label=org.opencontainers.image.url=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.source=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
extra_files:
- go.mod
- go.sum
- cmd
- pkg
- internal
- config.yaml.example
# 4. Gateway - Nginx reverse proxy for unified deployment
- id: gohoarder-gateway
images:
- ghcr.io/lukaszraczylo/gohoarder-gateway
goarch: amd64
tags:
- "{{ .Version }}-amd64"
- latest-amd64
- "{{ .Version }}"
- latest
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.gateway
labels:
org.opencontainers.image.title: GoHoarder Gateway
org.opencontainers.image.description: Nginx reverse proxy for unified GoHoarder deployment
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
- id: gohoarder-gateway-arm64
images:
- ghcr.io/lukaszraczylo/gohoarder-gateway
goarch: arm64
tags:
- "{{ .Version }}-arm64"
- latest-arm64
dockerfile: Dockerfile.gateway
labels:
org.opencontainers.image.title: GoHoarder Gateway
org.opencontainers.image.description: Nginx reverse proxy for unified GoHoarder deployment
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
flags:
- "--pull"
- "--label=org.opencontainers.image.title=GoHoarder Gateway"
- "--label=org.opencontainers.image.description=Nginx reverse proxy for unified GoHoarder deployment"
- "--label=org.opencontainers.image.url=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.source=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
# 5. Migration Engine - Database migration tool
- id: gohoarder-migrate
images:
- ghcr.io/lukaszraczylo/gohoarder-migrate
goarch: amd64
build_flags:
- "--build-arg=VERSION={{ .Version }}"
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
- "--build-arg=BUILD_TIME={{ .Date }}"
- "--build-arg=TARGETOS=linux"
- "--build-arg=TARGETARCH=amd64"
tags:
- "{{ .Version }}-amd64"
- latest-amd64
- "{{ .Version }}"
- latest
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.migrate
labels:
org.opencontainers.image.title: GoHoarder Migrate
org.opencontainers.image.description: Database migration tool for GoHoarder V2 schema
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
- id: gohoarder-migrate-arm64
images:
- ghcr.io/lukaszraczylo/gohoarder-migrate
goarch: arm64
build_flags:
- "--build-arg=VERSION={{ .Version }}"
- "--build-arg=GIT_COMMIT={{ .ShortCommit }}"
- "--build-arg=BUILD_TIME={{ .Date }}"
- "--build-arg=TARGETOS=linux"
- "--build-arg=TARGETARCH=arm64"
tags:
- "{{ .Version }}-arm64"
- latest-arm64
dockerfile: Dockerfile.migrate
labels:
org.opencontainers.image.title: GoHoarder Migrate
org.opencontainers.image.description: Database migration tool for GoHoarder V2 schema
org.opencontainers.image.url: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.source: https://github.com/lukaszraczylo/gohoarder
org.opencontainers.image.version: "{{ .Version }}"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
build_args:
VERSION: "{{ .Version }}"
GIT_COMMIT: "{{ .ShortCommit }}"
BUILD_TIME: "{{ .Date }}"
flags:
- "--pull"
- "--label=org.opencontainers.image.title=GoHoarder Migrate"
- "--label=org.opencontainers.image.description=Database migration tool for GoHoarder V2 schema"
- "--label=org.opencontainers.image.url=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.source=https://github.com/lukaszraczylo/gohoarder"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
extra_files:
- go.mod
- go.sum
- cmd
- pkg
- internal
- migrations
# Artifact signing with cosign
signs:
@@ -321,50 +283,3 @@ docker_signs:
- sign
- "${artifact}@${digest}"
- "--yes"
# Docker manifests for multi-arch support
docker_manifests:
- name_template: ghcr.io/lukaszraczylo/gohoarder-server:{{ .Version }}
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-server:{{ .Version }}-amd64
- ghcr.io/lukaszraczylo/gohoarder-server:{{ .Version }}-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-server:latest
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-server:latest-amd64
- ghcr.io/lukaszraczylo/gohoarder-server:latest-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-frontend:{{ .Version }}
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-frontend:{{ .Version }}-amd64
- ghcr.io/lukaszraczylo/gohoarder-frontend:{{ .Version }}-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-frontend:latest
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-frontend:latest-amd64
- ghcr.io/lukaszraczylo/gohoarder-frontend:latest-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-scanner:{{ .Version }}
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-scanner:{{ .Version }}-amd64
- ghcr.io/lukaszraczylo/gohoarder-scanner:{{ .Version }}-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-scanner:latest
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-scanner:latest-amd64
- ghcr.io/lukaszraczylo/gohoarder-scanner:latest-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-gateway:{{ .Version }}
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-gateway:{{ .Version }}-amd64
- ghcr.io/lukaszraczylo/gohoarder-gateway:{{ .Version }}-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-gateway:latest
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-gateway:latest-amd64
- ghcr.io/lukaszraczylo/gohoarder-gateway:latest-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-migrate:{{ .Version }}
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-migrate:{{ .Version }}-amd64
- ghcr.io/lukaszraczylo/gohoarder-migrate:{{ .Version }}-arm64
- name_template: ghcr.io/lukaszraczylo/gohoarder-migrate:latest
image_templates:
- ghcr.io/lukaszraczylo/gohoarder-migrate:latest-amd64
- ghcr.io/lukaszraczylo/gohoarder-migrate:latest-arm64
+1 -1
View File
@@ -4,7 +4,7 @@ ARG TARGETOS=linux
ARG TARGETARCH=amd64
# Build stage
FROM --platform=$TARGETOS/$TARGETARCH golang:1.23-alpine AS builder
FROM --platform=$TARGETOS/$TARGETARCH golang:1.25-alpine AS builder
# Install build dependencies for CGO
RUN apk add --no-cache \
+1 -1
View File
@@ -4,7 +4,7 @@ ARG TARGETOS=linux
ARG TARGETARCH=amd64
# Build stage
FROM --platform=$TARGETOS/$TARGETARCH golang:1.23-alpine AS builder
FROM --platform=$TARGETOS/$TARGETARCH golang:1.25-alpine AS builder
# Install build dependencies for CGO
RUN apk add --no-cache \
+1 -1
View File
@@ -4,7 +4,7 @@ ARG TARGETOS=linux
ARG TARGETARCH=amd64
# Build stage
FROM --platform=$TARGETOS/$TARGETARCH golang:1.23-alpine AS builder
FROM --platform=$TARGETOS/$TARGETARCH golang:1.25-alpine AS builder
# Install build dependencies for CGO
RUN apk add --no-cache \
+78
View File
@@ -0,0 +1,78 @@
#!/bin/bash
# Workflow prepare script for CI/CD
# Installs CGO dependencies for SQLite support
set -e
echo "=== GoHoarder Workflow Prepare ==="
echo "Host OS: $(uname -s)"
echo "Target GOOS: ${TARGET_GOOS:-auto}"
echo "Target GOARCH: ${TARGET_GOARCH:-auto}"
# Detect host OS
HOST_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
# Install SQLite development headers based on platform
case "$HOST_OS" in
linux*)
echo "Installing SQLite development headers for Linux..."
if command -v apt-get &> /dev/null; then
# Ubuntu/Debian
sudo apt-get update -qq
sudo apt-get install -y -qq libsqlite3-dev
elif command -v yum &> /dev/null; then
# RHEL/CentOS
sudo yum install -y sqlite-devel
elif command -v apk &> /dev/null; then
# Alpine
sudo apk add --no-cache sqlite-dev
fi
echo "✓ SQLite headers installed"
;;
darwin*)
echo "Installing SQLite for macOS..."
# macOS usually has SQLite via Xcode Command Line Tools
# but ensure it's available via Homebrew if needed
if ! pkg-config --exists sqlite3; then
brew install sqlite3
fi
echo "✓ SQLite available"
;;
mingw*|msys*|cygwin*)
echo "Installing SQLite for Windows..."
# Download SQLite amalgamation for Windows
SQLITE_VERSION="3470200"
SQLITE_YEAR="2024"
SQLITE_DIR="/c/sqlite"
SQLITE_URL="https://www.sqlite.org/${SQLITE_YEAR}/sqlite-amalgamation-${SQLITE_VERSION}.zip"
mkdir -p "$SQLITE_DIR"
curl -sSL "$SQLITE_URL" -o /tmp/sqlite.zip
unzip -q /tmp/sqlite.zip -d /tmp/
cp /tmp/sqlite-amalgamation-${SQLITE_VERSION}/* "$SQLITE_DIR/"
rm -rf /tmp/sqlite.zip /tmp/sqlite-amalgamation-${SQLITE_VERSION}
echo "CGO_CFLAGS=-I${SQLITE_DIR}" >> "$GITHUB_ENV"
echo "CGO_LDFLAGS=-L${SQLITE_DIR}" >> "$GITHUB_ENV"
echo "✓ SQLite setup complete"
;;
*)
echo "Unknown OS: $HOST_OS - skipping SQLite setup"
;;
esac
# Verify SQLite is available
echo ""
echo "=== Verifying SQLite availability ==="
if pkg-config --exists sqlite3; then
echo "✓ SQLite pkg-config found"
pkg-config --modversion sqlite3
else
echo "⚠ SQLite pkg-config not found (may still work via system headers)"
fi
echo ""
echo "=== Workflow prepare complete ==="