18 Commits

Author SHA1 Message Date
02ae924b02 fix(Dockerfile): respect target platform
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 16s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 11s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 32s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 24s
Release / Release application (push) Successful in 4m19s
Release / Upload Images to docker.io (push) Successful in 1m2s
2026-01-31 23:13:20 +01:00
df8b3b4a8b fix(goreleaser): add dependency updates in changelog
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 12s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 9s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
2026-01-31 22:56:52 +01:00
c40b83e42a docs(README): add badge from ArtifactHub
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Update Docker Hub Description / update-description-on-hub-docker-io (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 31s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
2026-01-31 22:51:54 +01:00
4e84183c14 fix(ci): install curl, syft and configure buildx
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
Release / Release application (push) Successful in 8m42s
Release / Upload Images to docker.io (push) Successful in 51s
2026-01-31 22:26:52 +01:00
f5eaa7576c feat(goreleaser): support SBOM and ARMv5
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 11s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 29s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 25s
The following patch adjusts the Goreleaser configuration to build ARMv5 binaries
as well as container images. It also replaces docker and docker_manifest with
docker_v2.

Goreleaser has also been extended to generate SBOM files in cdx and spdx format.
2026-01-31 22:17:46 +01:00
94d199b837 fix(artifacthub): add repository config
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 39s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 22s
Lint Markdown files / Run markdown linter (push) Successful in 8s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m41s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 59s
2026-01-31 18:49:17 +01:00
0cada74c59 Merge pull request 'chore(deps): update actions/checkout action to v6.0.2' (#125) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 33s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 25s
2026-01-22 18:43:53 +00:00
b8f58d7072 chore(deps): update actions/checkout action to v6.0.2
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 34s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 18s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Lint Markdown files / Run markdown linter (pull_request) Successful in 5s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 6s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 1m41s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 57s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 31s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 25s
2026-01-22 17:06:57 +00:00
bd94317908 Merge pull request 'chore(deps): update actions/setup-go action to v6.2.0' (#124) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 33s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 23s
2026-01-13 05:11:31 +00:00
b53136e799 chore(deps): update actions/setup-go action to v6.2.0
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 9s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (pull_request) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 31s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 33s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 23s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 23s
2026-01-13 05:05:49 +00:00
52151c6588 Merge pull request 'chore(deps): update dependency goreleaser/goreleaser to v2.13.3' (#123) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 11s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 7s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 31s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 21s
2026-01-10 05:10:38 +00:00
4fc36e9857 chore(deps): update dependency goreleaser/goreleaser to v2.13.3
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 20s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 32s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 22s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 31s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 24s
2026-01-10 05:06:01 +00:00
9348f3c43c Merge pull request 'chore(deps): update dependency golangci/golangci-lint to v2.8.0' (#122) from renovate/golangci-golangci-lint-2.x into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 34s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 17s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 23s
2026-01-08 22:05:53 +00:00
62551bf4f1 chore(deps): update dependency golangci/golangci-lint to v2.8.0
All checks were successful
Lint Markdown files / Run markdown linter (pull_request) Successful in 10s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 34s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 9s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 18s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m42s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 58s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 23s
2026-01-07 23:05:46 +00:00
5ab6e824c3 Merge pull request 'chore(deps): update dependency goreleaser/goreleaser to v2.13.2' (#121) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 9s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 32s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
2025-12-24 20:14:26 +00:00
6668fd0f3f chore(deps): update dependency goreleaser/goreleaser to v2.13.2
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 10s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Markdown files / Run markdown linter (pull_request) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 29s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 31s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 22s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
2025-12-24 20:05:45 +00:00
6bf1f8a314 fix(cmd): adapt error message
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 46s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 19s
Lint Markdown files / Run markdown linter (push) Successful in 5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m47s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 58s
2025-12-23 00:10:17 +01:00
8c52e19275 fix(domain): mergeExistingWin: Services and Volumes
Merge existing win of services and volumes correctly
2025-12-23 00:08:04 +01:00
12 changed files with 296 additions and 133 deletions

View File

@@ -20,10 +20,10 @@ jobs:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v6.0.1
- uses: actions/setup-go@v6.1.0
- uses: actions/checkout@v6.0.2
- uses: actions/setup-go@v6.2.0
with:
go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v9.2.0
with:
version: v2.7.2 # renovate: datasource=github-releases depName=golangci/golangci-lint
version: v2.8.0 # renovate: datasource=github-releases depName=golangci/golangci-lint

View File

@@ -33,8 +33,8 @@ jobs:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v6.0.1
- uses: actions/setup-go@v6.1.0
- uses: actions/checkout@v6.0.2
- uses: actions/setup-go@v6.2.0
with:
go-version: ${{ matrix.go }}
- env:

View File

@@ -13,7 +13,7 @@ jobs:
name: "Run markdown linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.1
- uses: actions/checkout@v6.0.2
- uses: DavidAnson/markdownlint-cli2-action@v21.0.0
with:
globs: '**/*.md'

View File

@@ -1,4 +1,4 @@
name: "Release"
name: Release
on:
push:
@@ -12,11 +12,28 @@ jobs:
name: "Release application"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.1
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Install curl
run: apt-get update && apt-get install --yes curl
- name: Install syft
env:
SYFT_VERSION: "1.41.1" # renovate: datasource=github-releases depName=anchore/syft
run: |
OS="$(uname | tr '[:upper:]' '[:lower:]')"
ARCH="$(dpkg --print-architecture)"
curl \
--fail \
--location \
--silent \
--output syft_${SYFT_VERSION}_${OS}_${ARCH}.deb \
"https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_${OS}_${ARCH}.deb"
dpkg -i syft_${SYFT_VERSION}_${OS}_${ARCH}.deb
rm syft_${SYFT_VERSION}_${OS}_${ARCH}.deb
- uses: docker/setup-qemu-action@v3.7.0
- uses: actions/setup-go@v6.1.0
- uses: docker/setup-buildx-action@v3.12.0
- uses: actions/setup-go@v6.2.0
with:
go-version: stable
- uses: docker/login-action@v3.6.0
@@ -30,7 +47,7 @@ jobs:
GOPROXY: ${{ vars.GOPROXY }}
uses: goreleaser/goreleaser-action@v6.4.0
with:
version: v2.13.1 # renovate: datasource=github-releases depName=goreleaser/goreleaser
version: v2.13.3 # renovate: datasource=github-releases depName=goreleaser/goreleaser
args: release --clean
sync-to-hub-docker-io:

View File

@@ -10,7 +10,7 @@ jobs:
update-description-on-hub-docker-io:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.1
- uses: actions/checkout@v6.0.2
- uses: peter-evans/dockerhub-description@v5.0.0
with:
username: ${{ secrets.DOCKER_IO_USERNAME }}

View File

@@ -1,7 +1,17 @@
project_name: dcmerge
archives:
- formats: [ "tar.xz" ]
- id: archives
formats:
- tar.xz
name_template: >-
{{ .ProjectName }}-
{{- .Version }}-
{{- .Os }}-
{{- if eq .Arch "amd64" }}amd64
{{- else if eq .Arch "amd64_v1" }}amd64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}-{{ .Arm }}{{ end }}
files:
- README.md
- LICENSE
@@ -11,15 +21,9 @@ before:
- go mod tidy
builds:
- main: main.go
binary: >-
{{ .ProjectName }}-
{{- .Version }}-
{{- .Os }}-
{{- if eq .Arch "amd64" }}amd64
{{- else if eq .Arch "amd64_v1" }}amd64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}-{{ .Arm }}{{ end }}
- id: dcmerge
main: main.go
binary: dcmerge
env:
- CGO_ENABLED=0
- GONOSUMDB={{ .Env.GONOSUMDB }}
@@ -32,17 +36,19 @@ builds:
- arm64
- riscv64
goarm:
- "5"
- "6"
- "7"
flags:
- -trimpath
- -mod=readonly
- -modcacherw
ldflags:
- -s -w -X 'main.version={{ trimprefix .Tag "v" }}'
- -s -w -X 'main.version={{ .Version }}'
changelog:
filters:
exclude:
- '^chore'
- '^docs'
- '^test'
- Merge pull request
@@ -56,117 +62,254 @@ changelog:
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Dependencies
regexp: '^.*?chore\(deps\):.+$'
order: 2
- title: Others
order: 999
sort: asc
use: git
dockers:
- build_flag_templates:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source={{ .GitURL }}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
- --platform=linux/amd64
- --pull
dockerfile: Dockerfile
goarch: amd64
goos: linux
image_templates:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
skip_push: false
use: buildx
dockers_v2:
- # ID of the image, needed if you want to filter by it later on (e.g. on custom publishers).
# Default: project name
id: container-images
- build_flag_templates:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source={{ .GitURL }}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
- --platform=linux/arm/v6
- --pull
dockerfile: Dockerfile
goarch: arm
goarm: "6"
goos: linux
image_templates:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
skip_push: false
use: buildx
# Path to the Dockerfile (from the project root).
dockerfile: Dockerfile.scratch
- build_flag_templates:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source={{ .GitURL }}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
- --platform=linux/arm/v7
- --pull
dockerfile: Dockerfile
goarch: arm
goarm: "7"
goos: linux
image_templates:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
skip_push: false
use: buildx
# IDs to filter the binaries/packages.
#
# Make sure to only include the IDs of binaries you want to `COPY` in your
# Dockerfile.
#
# If you include IDs that don't exist or are not available for the current
# architecture being built, the build of the image will be skipped.
ids:
- dcmerge
- build_flag_templates:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source={{ .GitURL }}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
- --platform=linux/arm64
- --pull
dockerfile: Dockerfile
goarch: arm64
goos: linux
image_templates:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
skip_push: false
use: buildx
# Annotations to be added to the image.
annotations:
org.opencontainers.image.authors: "Volker Raschek"
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.description: "{{ .ProjectName }}"
org.opencontainers.image.documentation: "{{ .ProjectName }}"
org.opencontainers.image.licenses: "MIT"
org.opencontainers.image.revision: "{{ .FullCommit }}"
org.opencontainers.image.source: "{{ .GitURL }}"
org.opencontainers.image.title: "{{ .ProjectName }}"
org.opencontainers.image.url: "https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}"
org.opencontainers.image.vendor: "Volker Raschek"
org.opencontainers.image.version: "{{ .Version }}"
- build_flag_templates:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source={{ .GitURL }}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
- --platform=linux/riscv64
- --pull
dockerfile: Dockerfile
goarch: riscv64
goos: linux
image_templates:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
skip_push: false
use: buildx
io.artifacthub.package.alternative-locations: "docker.io/volkerraschek/{{ .ProjectName }}:{{ .Version }}"
io.artifacthub.package.keywords: "docker,docker-compose,merge,ci"
io.artifacthub.package.license: "MIT"
io.artifacthub.package.readme-url: "https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}/raw/tag/v{{ .Version }}/README.md"
docker_manifests:
- name_template: 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}'
image_templates:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
labels: {}
images:
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}'
# Platforms to build.
platforms:
- linux/amd64
- linux/arm/v5
- linux/arm/v6
- linux/arm/v7
- linux/arm64
- linux/riscv64
# Whether to create and attach a SBOM to the image.
sbom: "{{ not .IsNightly }}"
# Tag names.
#
# Empty tags are ignored.
tags:
- "{{ .Version }}"
- "{{ if .IsNightly }}nightly{{ end }}"
- "{{ if not .IsNightly }}latest{{ end }}"
# RPM packages
nfpms:
- id: nfpms
ids:
- dcmerge
package_name: dcmerge
file_name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{- if .Arm }}-{{ .Arm }}{{ end }}"
vendor: "Volker Raschek"
homepage: "https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}"
maintainer: "Volker Raschek <volker.raschek@cryptic.systems>"
description: |-
dcmerge is a tool to merge docker-compose files from multiple resources.
It supports merging local files and remote files via HTTP/HTTPS.
license: MIT
formats:
- deb
- rpm
dependencies:
- git
recommends:
- docker-compose
suggests:
- docker
bindir: /usr/bin
contents:
- src: ./README.md
dst: "/usr/share/doc/{{ .ProjectName }}/README.md"
file_info:
mode: 0644
# License
- src: ./LICENSE
dst: "/usr/share/doc/{{ .ProjectName }}/LICENSE"
file_info:
mode: 0644
- src: ./LICENSE
dst: "/usr/share/licenses/{{ .ProjectName }}/LICENSE"
file_info:
mode: 0644
# Create man page directory
- dst: /usr/share/man/man1
type: dir
file_info:
mode: 0755
rpm:
group: Development/Tools
summary: Tool to merge docker-compose files from multiple resources
compression: xz
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
sboms:
- # ID of the sbom config, must be unique.
#
# Default: 'default'.
id: sboms-cyclonedx
# IDs of the artifacts to catalog.
#
# If `artifacts` is "source" or "any" then this fields has no effect.
ids:
- dcmerge
# Which artifacts to catalog.
#
# Valid options are:
# - any: let the SBOM tool decide which artifacts available in
# the cwd should be cataloged
# - source: source archive
# - package: Linux packages (deb, rpm, apk, etc)
# - installer: Windows MSI installers (Pro only)
# - diskimage: macOS DMG disk images (Pro only)
# - archive: archives from archive pipe
# - binary: binaries output from the build stage
#
# Default: 'archive'.
artifacts: binary
# List of names of the SBOM documents created at this step
# (relative to the dist dir).
#
# Each element configured is made available as variables. For example:
# documents: ["foo", "bar"]
#
# would make the following variables that can be referenced as template keys:
# document0: "foo"
# document1: "bar"
#
# Note that multiple sbom values are only allowed if the value of
# "artifacts" is "any".
#
# Default:
# When "binary": ["{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.sbom.json"]
# When "any": []
# Otherwise: ["{{ .ArtifactName }}.sbom.json"]
# Templates: allowed.
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{- if .Arm }}-{{ .Arm }}{{ end }}.cdx.json"
# Path to the SBOM generator command
#
# Note: the process CWD will be set to the same location as "dist"
#
# Default: 'syft'.
cmd: syft
# Command line arguments for the command
#
# Default: ["$artifact", "--output", "spdx-json=$document", "--enrich", "all"].
# Templates: allowed.
args:
- "$artifact"
- "--enrich=all"
- "--output=cyclonedx-json=$document"
- # ID of the sbom config, must be unique.
#
# Default: 'default'.
id: sboms-spdx
# IDs of the artifacts to catalog.
#
# If `artifacts` is "source" or "any" then this fields has no effect.
ids:
- dcmerge
# Which artifacts to catalog.
#
# Valid options are:
# - any: let the SBOM tool decide which artifacts available in
# the cwd should be cataloged
# - source: source archive
# - package: Linux packages (deb, rpm, apk, etc)
# - installer: Windows MSI installers (Pro only)
# - diskimage: macOS DMG disk images (Pro only)
# - archive: archives from archive pipe
# - binary: binaries output from the build stage
#
# Default: 'archive'.
artifacts: binary
# List of names of the SBOM documents created at this step
# (relative to the dist dir).
#
# Each element configured is made available as variables. For example:
# documents: ["foo", "bar"]
#
# would make the following variables that can be referenced as template keys:
# document0: "foo"
# document1: "bar"
#
# Note that multiple sbom values are only allowed if the value of
# "artifacts" is "any".
#
# Default:
# When "binary": ["{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.sbom.json"]
# When "any": []
# Otherwise: ["{{ .ArtifactName }}.sbom.json"]
# Templates: allowed.
documents:
- "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{- if .Arm }}-{{ .Arm }}{{ end }}.spdx.json"
# Path to the SBOM generator command
#
# Note: the process CWD will be set to the same location as "dist"
#
# Default: 'syft'.
cmd: syft
# Command line arguments for the command
#
# Default: ["$artifact", "--output", "spdx-json=$document", "--enrich", "all"].
# Templates: allowed.
args:
- "$artifact"
- "--enrich=all"
- "--output=spdx-json=$document"
gitea_urls:
api: https://git.cryptic.systems/api/v1

View File

@@ -1,5 +0,0 @@
FROM scratch AS build
COPY dcmerge-* /usr/bin/dcmerge
ENTRYPOINT [ "/usr/bin/dcmerge" ]

4
Dockerfile.scratch Normal file
View File

@@ -0,0 +1,4 @@
FROM scratch AS build
ARG TARGETPLATFORM
COPY "${TARGETPLATFORM}/dcmerge" "/usr/bin/dcmerge"
ENTRYPOINT [ "/usr/bin/dcmerge" ]

View File

@@ -1,5 +1,6 @@
# dcmerge
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/dcmerge)](https://artifacthub.io/packages/search?repo=dcmerge)
[![Docker Pulls](https://img.shields.io/docker/pulls/volkerraschek/dcmerge)](https://hub.docker.com/r/volkerraschek/dcmerge)
`dcmerge` is a small program to merge docker-compose files from multiple sources. It is available via RPM and docker.

3
artifacthub-repo.yml Normal file
View File

@@ -0,0 +1,3 @@
repositoryID: 2a061ce3-fe96-4fbe-b053-eccdb63001bc
owners:
- name: Volker Raschek

View File

@@ -55,7 +55,7 @@ dcmerge docker-compose.yml https://git.example.local/user/repo/docker-compose.ym
func run(cmd *cobra.Command, args []string) error {
mergeExisting, err := cmd.Flags().GetBool("existing-win")
if err != nil {
return fmt.Errorf("failed to parse flag last-win: %s", err)
return fmt.Errorf("failed to parse flag existing-win: %s", err)
}
mergeLastWin, err := cmd.Flags().GetBool("last-win")
@@ -78,7 +78,7 @@ func run(cmd *cobra.Command, args []string) error {
for _, config := range dockerComposeConfigs {
switch {
case mergeExisting && mergeLastWin:
return fmt.Errorf("neither --first-win or --last-win can be specified - not booth")
return fmt.Errorf("neither --existing-win or --last-win can be specified - not booth")
case mergeExisting && !mergeLastWin:
dockerComposeConfig.MergeExistingWin(config)
case !mergeExisting && mergeLastWin:

View File

@@ -182,7 +182,7 @@ func (c *Config) mergeExistingWinSecrets(secrets map[string]*Secret) {
continue
}
if c.ExistsNetwork(secretName) {
if c.ExistsSecret(secretName) {
c.Secrets[secretName].MergeExistingWin(secret)
} else {
c.Secrets[secretName] = secret
@@ -210,7 +210,7 @@ func (c *Config) mergeExistingWinVolumes(volumes map[string]*Volume) {
continue
}
if c.ExistsNetwork(volumeName) {
if c.ExistsVolume(volumeName) {
c.Volumes[volumeName].MergeExistingWin(volume)
} else {
c.Volumes[volumeName] = volume