30 Commits

Author SHA1 Message Date
5e857ceda1 chore(deps): update module github.com/spf13/cobra to v1.10.1
Some checks failed
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 2m8s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m5s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 1m5s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 45s
Lint Markdown files / Run markdown linter (pull_request) Successful in 14s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Has been cancelled
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Has been cancelled
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Has been cancelled
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Has been cancelled
2025-09-01 19:05:45 +00:00
4218c59a41 Merge pull request 'chore(deps): update module github.com/stretchr/testify to v1.11.1' (#90) from renovate/go-modules into master
All checks were successful
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 23s
Lint Markdown files / Run markdown linter (push) Successful in 10s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 1m6s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m4s
2025-08-27 13:08:43 +00:00
d630fc1dd9 chore(deps): update module github.com/stretchr/testify to v1.11.1
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m41s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 1m52s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 59s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m12s
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 23s
Lint Markdown files / Run markdown linter (pull_request) Successful in 11s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 48s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 49s
2025-08-27 13:03:49 +00:00
66b6dd523b Merge pull request 'chore(deps): update module github.com/stretchr/testify to v1.11.0' (#89) from renovate/go-modules into master
All checks were successful
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-amd64) (push) Successful in 49s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 24s
Lint Markdown files / Run markdown linter (push) Successful in 9s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 38s
2025-08-24 19:08:36 +00:00
e1f6342764 chore(deps): update module github.com/stretchr/testify to v1.11.0
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m43s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 2m8s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 58s
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-amd64) (push) Successful in 1m12s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 24s
Lint Markdown files / Run markdown linter (pull_request) Successful in 10s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 42s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 39s
2025-08-24 19:03:43 +00:00
9a7b86774f Merge pull request 'chore(deps): update goreleaser/goreleaser-action action to v6.4.0' (#88) from renovate/actions into master
All checks were successful
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-amd64) (push) Successful in 52s
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 21s
2025-08-14 16:09:05 +00:00
d47ea456ba chore(deps): update goreleaser/goreleaser-action action to v6.4.0
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 8s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 6s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 6s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 1m18s
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
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) (pull_request) Successful in 22s
2025-08-14 16:04:11 +00:00
09b1b1e7d2 Merge pull request 'chore(deps): update dependency golangci/golangci-lint to v2.4.0' (#87) 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 8s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m50s
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 21s
2025-08-14 01:18:06 +00:00
dafa93ffa3 chore(deps): update dependency golangci/golangci-lint to v2.4.0
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 30s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 14s
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) (pull_request) Successful in 6s
Lint Markdown files / Run markdown linter (pull_request) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m38s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 58s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 29s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 23s
2025-08-14 01:05:04 +00:00
6bfadcf71f Merge pull request 'chore(deps): update dependency golangci/golangci-lint to v2.3.1' (#86) 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 13s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 5s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 41s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
2025-08-12 10:15:36 +00:00
740a5898f4 chore(deps): update dependency golangci/golangci-lint to v2.3.1
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 44s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 44s
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-amd64) (push) Successful in 14s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 7s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 13s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 39s
2025-08-12 09:49:07 +00:00
027e7ed7ad chore(deps): update actions/checkout to v4.3.0
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 Markdown files / Run markdown linter (push) Successful in 6s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 45s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 25s
2025-08-12 08:48:30 +02:00
b24b4e6a71 chore(deps): update golangci/golangci-lint to v2.3.0
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 13s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 42s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 46s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 22s
2025-08-12 08:31:39 +02:00
c60eb969d0 fix(golangci): add config
All checks were successful
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 6s
Lint Markdown files / Run markdown linter (push) Successful in 3s
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 23s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 59s
2025-08-12 08:29:38 +02:00
405f996e19 style(ci): rename workflows
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 10s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 28s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 23s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m2s
2025-08-12 08:20:28 +02:00
f0a9073fa1 Merge pull request 'chore(deps): update actions/checkout action to v4.3.0' (#84) from renovate/actions into master
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 6s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / markdown-lint (push) Successful in 4s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 22s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 30s
2025-08-11 14:00:53 +00:00
acaee3903c chore(deps): update actions/checkout action to v4.3.0
All checks were successful
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 2m19s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 1m45s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 1m5s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (pull_request) Successful in 20s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (pull_request) Successful in 29s
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 27s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (pull_request) Successful in 6s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (pull_request) Successful in 18s
2025-08-11 13:08:53 +00:00
ed4609b326 Merge pull request 'chore(deps): update docker/login-action action to v3.5.0' (#83) from renovate/actions into master
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 23s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 31s
Lint Markdown files / markdown-lint (push) Successful in 11s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 29s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 35s
2025-08-04 18:22:02 +00:00
a032247c59 chore(deps): update docker/login-action action to v3.5.0
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 1m50s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 1m7s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (pull_request) Successful in 25s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (pull_request) Successful in 30s
Lint Markdown files / markdown-lint (pull_request) Successful in 12s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 1m11s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 58s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (pull_request) Successful in 31s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (pull_request) Successful in 32s
2025-08-04 16:04:07 +00:00
7ed6fee298 chore(deps): update davidanson/markdownlint-cli2-action action to v20
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-amd64) (pull_request) Successful in 6s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (pull_request) Successful in 8s
Lint Markdown files / markdown-lint (pull_request) Successful in 14s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (pull_request) Successful in 33s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (pull_request) Successful in 46s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 5s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / markdown-lint (push) Successful in 4s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 22s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 30s
2025-06-01 11:43:25 +00:00
9c256a53c4 chore(ci): use DavidAnson/markdownlint-cli2-action@v19.1.0
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 6s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / markdown-lint (push) Successful in 4s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 31s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 47s
2025-06-01 13:38:28 +02:00
a5423dfe4d chore(ci): use matrix to run tests on multiple architectures
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 27s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 15s
Markdown linter / markdown-lint (push) Successful in 3s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 1m18s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 46s
2025-06-01 12:11:41 +02:00
9705b468fa chore(ci): be golangci-lint compatible
All checks were successful
Golang Tests / unittest (push) Successful in 28s
Markdown linter / markdown-lint (push) Successful in 3s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 1m49s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 2m13s
2025-05-31 23:02:00 +02:00
f8a7634e91 chore(ci): add matrix for golangci-lint
Some checks failed
Markdown linter / markdown-lint (push) Successful in 7s
Golang Tests / unittest (push) Successful in 30s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Failing after 43s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Failing after 3m24s
2025-05-31 22:57:52 +02:00
96bdc09d14 chore(ci): add golangci-lint
Some checks failed
Golang Tests / unittest (push) Successful in 30s
Markdown linter / markdown-lint (push) Successful in 10s
Golang CI lint / golangci (push) Failing after 3m0s
2025-05-31 22:54:06 +02:00
96447f88b3 chore(ci): update workflow_dispatch for update docker hub description
All checks were successful
Golang Tests / unittest (push) Successful in 32s
Markdown linter / markdown-lint (push) Successful in 14s
2025-05-31 22:05:54 +02:00
8635fd3334 fix(ignore): add dist directory
All checks were successful
Golang Tests / unittest (push) Successful in 20s
Markdown linter / markdown-lint (push) Successful in 10s
2025-05-31 21:41:49 +02:00
a6da12db45 style(vscode): remove project config
All checks were successful
Markdown linter / markdown-lint (push) Successful in 13s
Golang Tests / unittest (push) Successful in 25s
2025-05-31 21:05:39 +02:00
07067b6b47 chore(Makefile): remove unqualified image tag
All checks were successful
Markdown linter / markdown-lint (push) Successful in 8s
Golang Tests / unittest (push) Successful in 34s
2025-05-31 18:11:35 +02:00
b50b9d8f19 style(linter): be compliant with golangci-lint
All checks were successful
Markdown linter / markdown-lint (push) Successful in 12s
Golang Tests / unittest (push) Successful in 29s
2025-05-29 13:44:55 +02:00
16 changed files with 131 additions and 67 deletions

View File

@ -0,0 +1,29 @@
name: "Lint Golang files"
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
permissions:
contents: read
jobs:
golangci:
name: "Run golang CI linter"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v4.3.0
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v8.0.0
with:
version: v2.4.0 # renovate: datasource=github-releases depName=golangci/golangci-lint

View File

@ -1,4 +1,4 @@
name: Golang Tests name: "Run Golang tests"
on: on:
pull_request: pull_request:
@ -6,16 +6,37 @@ on:
push: push:
branches: [ '**' ] branches: [ '**' ]
tags-ignore: [ '**' ] tags-ignore: [ '**' ]
workflow_dispatch: {}
jobs: jobs:
unittest: # integration-test:
runs-on: # name: "Run integration tests"
- ubuntu-latest # runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# go: [ stable ]
# os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
# steps:
# - uses: actions/checkout@v4.3.0
# - uses: actions/setup-go@v5.5.0
# with:
# go-version: ${{ matrix.go }}
# - env:
# GOPROXY: ${{ vars.GOPROXY }}
# run: make test/integration
unit-test:
name: "Run unit tests"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v4.3.0
- uses: actions/setup-go@v5.5.0 - uses: actions/setup-go@v5.5.0
with: with:
go-version: stable go-version: ${{ matrix.go }}
- env: - env:
GOPROXY: ${{ vars.GOPROXY }} GOPROXY: ${{ vars.GOPROXY }}
run: make test/unit run: make test/unit

View File

@ -1,20 +1,19 @@
name: Markdown linter name: "Lint Markdown files"
on: on:
pull_request: pull_request:
types: [ "opened", "reopened", "synchronize" ] types: [ "opened", "reopened", "synchronize" ]
push: push:
branches: [ '**' ] branches: [ '*' ]
tags-ignore: [ '**' ] tags-ignore: [ '*' ]
workflow_dispatch: {} workflow_dispatch: {}
jobs: jobs:
markdown-lint: markdown-lint:
container: name: "Run markdown linter"
image: git.cryptic.systems/volker.raschek/markdownlint:0.45.0 runs-on: ubuntu-latest
runs-on:
- ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v4.3.0
- name: Lint Markdown files - uses: DavidAnson/markdownlint-cli2-action@v20.0.0
run: markdownlint --config .markdownlint.yaml . with:
globs: '**/*.md'

View File

@ -1,4 +1,4 @@
name: Release name: "Release"
on: on:
push: push:
@ -9,15 +9,15 @@ permissions:
jobs: jobs:
release: release:
runs-on: name: "Release application"
- ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v4.3.0
- uses: docker/setup-qemu-action@v3.6.0 - uses: docker/setup-qemu-action@v3.6.0
- uses: actions/setup-go@v5.5.0 - uses: actions/setup-go@v5.5.0
with: with:
go-version: stable go-version: stable
- uses: docker/login-action@v3.4.0 - uses: docker/login-action@v3.5.0
with: with:
registry: git.cryptic.systems registry: git.cryptic.systems
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
@ -26,12 +26,13 @@ jobs:
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
GONOSUMDB: ${{ vars.GONOSUMDB }} GONOSUMDB: ${{ vars.GONOSUMDB }}
GOPROXY: ${{ vars.GOPROXY }} GOPROXY: ${{ vars.GOPROXY }}
uses: goreleaser/goreleaser-action@v6.3.0 uses: goreleaser/goreleaser-action@v6.4.0
with: with:
version: "~> v2" version: v2.11.2 # renovate: datasource=github-releases depName=goreleaser/goreleaser
args: release --clean args: release --clean
sync-to-hub-docker-io: sync-to-hub-docker-io:
name: "Upload Images to docker.io"
needs: needs:
- release - release
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -1,16 +1,16 @@
name: Update Docker Hub Description name: "Update Docker Hub Description"
on: on:
push: push:
branches: [ 'master' ] branches: [ 'master' ]
paths: [ 'README.md' ] paths: [ 'README.md' ]
workflow_dispatch: {}
jobs: jobs:
update-description-on-hub-docker-io: update-description-on-hub-docker-io:
runs-on: runs-on: ubuntu-latest
- ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v4.3.0
- uses: peter-evans/dockerhub-description@v4.0.2 - uses: peter-evans/dockerhub-description@v4.0.2
with: with:
username: ${{ secrets.DOCKER_IO_USERNAME }} username: ${{ secrets.DOCKER_IO_USERNAME }}

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
dcmerge dcmerge
coverage.txt coverage.txt
dist

13
.golangci.yaml Normal file
View File

@ -0,0 +1,13 @@
version: "2"
linters:
default: standard
enable:
- errname
- gosec
exclusions:
rules: []
warn-unused: true
run:
tests: true

View File

@ -1,3 +0,0 @@
{
"rewrap.wrappingColumn": 120,
}

View File

@ -20,7 +20,6 @@ DCMERGE_IMAGE_NAMESPACE?=${DCMERGE_IMAGE_REGISTRY_USER}
DCMERGE_IMAGE_NAME:=${EXECUTABLE} DCMERGE_IMAGE_NAME:=${EXECUTABLE}
DCMERGE_IMAGE_VERSION?=latest DCMERGE_IMAGE_VERSION?=latest
DCMERGE_IMAGE_FULLY_QUALIFIED=${DCMERGE_IMAGE_REGISTRY_NAME}/${DCMERGE_IMAGE_NAMESPACE}/${DCMERGE_IMAGE_NAME}:${DCMERGE_IMAGE_VERSION} DCMERGE_IMAGE_FULLY_QUALIFIED=${DCMERGE_IMAGE_REGISTRY_NAME}/${DCMERGE_IMAGE_NAMESPACE}/${DCMERGE_IMAGE_NAME}:${DCMERGE_IMAGE_VERSION}
DCMERGE_IMAGE_UNQUALIFIED=${DCMERGE_IMAGE_NAMESPACE}/${DCMERGE_IMAGE_NAME}:${DCMERGE_IMAGE_VERSION}
# BIN # BIN
# ============================================================================== # ==============================================================================
@ -93,14 +92,13 @@ container-image/build:
--no-cache \ --no-cache \
--pull \ --pull \
--tag ${DCMERGE_IMAGE_FULLY_QUALIFIED} \ --tag ${DCMERGE_IMAGE_FULLY_QUALIFIED} \
--tag ${DCMERGE_IMAGE_UNQUALIFIED} \
. .
# DELETE CONTAINER IMAGE # DELETE CONTAINER IMAGE
# ============================================================================== # ==============================================================================
PHONY:=container-image/delete PHONY:=container-image/delete
container-image/delete: container-image/delete:
- ${CONTAINER_RUNTIME} image rm ${DCMERGE_IMAGE_FULLY_QUALIFIED} ${DCMERGE_IMAGE_UNQUALIFIED} - ${CONTAINER_RUNTIME} image rm ${DCMERGE_IMAGE_FULLY_QUALIFIED}
# PUSH CONTAINER IMAGE # PUSH CONTAINER IMAGE
# ============================================================================== # ==============================================================================

View File

@ -19,16 +19,18 @@ func Execute(version string) error {
DisableFlagsInUseLine: true, DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.MatchAll(cobra.ExactArgs(1)), Args: cobra.MatchAll(cobra.ExactArgs(1)),
Run: func(cmd *cobra.Command, args []string) { RunE: func(cmd *cobra.Command, args []string) error {
switch args[0] { switch args[0] {
case "bash": case "bash":
cmd.Root().GenBashCompletion(os.Stdout) return cmd.Root().GenBashCompletion(os.Stdout)
case "zsh": case "zsh":
cmd.Root().GenZshCompletion(os.Stdout) return cmd.Root().GenZshCompletion(os.Stdout)
case "fish": case "fish":
cmd.Root().GenFishCompletion(os.Stdout, true) return cmd.Root().GenFishCompletion(os.Stdout, true)
case "powershell": case "powershell":
cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout) return cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout)
default:
return fmt.Errorf("unknown shell: %v", args[0])
} }
}, },
} }
@ -53,17 +55,17 @@ dcmerge docker-compose.yml https://git.example.local/user/repo/docker-compose.ym
func run(cmd *cobra.Command, args []string) error { func run(cmd *cobra.Command, args []string) error {
mergeExisting, err := cmd.Flags().GetBool("existing-win") mergeExisting, err := cmd.Flags().GetBool("existing-win")
if err != nil { if err != nil {
return fmt.Errorf("Failed to parse flag last-win: %s", err) return fmt.Errorf("failed to parse flag last-win: %s", err)
} }
mergeLastWin, err := cmd.Flags().GetBool("last-win") mergeLastWin, err := cmd.Flags().GetBool("last-win")
if err != nil { if err != nil {
return fmt.Errorf("Failed to parse flag last-win: %s", err) return fmt.Errorf("failed to parse flag last-win: %s", err)
} }
outputFile, err := cmd.Flags().GetString("output-file") outputFile, err := cmd.Flags().GetString("output-file")
if err != nil { if err != nil {
return fmt.Errorf("Failed to parse flag output-file: %s", err) return fmt.Errorf("failed to parse flag output-file: %s", err)
} }
dockerComposeConfig := dockerCompose.NewConfig() dockerComposeConfig := dockerCompose.NewConfig()
@ -76,7 +78,7 @@ func run(cmd *cobra.Command, args []string) error {
for _, config := range dockerComposeConfigs { for _, config := range dockerComposeConfigs {
switch { switch {
case mergeExisting && mergeLastWin: case mergeExisting && mergeLastWin:
return fmt.Errorf("Neither --first-win or --last-win can be specified - not booth.") return fmt.Errorf("neither --first-win or --last-win can be specified - not booth")
case mergeExisting && !mergeLastWin: case mergeExisting && !mergeLastWin:
dockerComposeConfig.MergeExistingWin(config) dockerComposeConfig.MergeExistingWin(config)
case !mergeExisting && mergeLastWin: case !mergeExisting && mergeLastWin:
@ -88,16 +90,18 @@ func run(cmd *cobra.Command, args []string) error {
switch { switch {
case len(outputFile) > 0: case len(outputFile) > 0:
// #nosec G301
err = os.MkdirAll(filepath.Dir(outputFile), 0755) err = os.MkdirAll(filepath.Dir(outputFile), 0755)
if err != nil { if err != nil {
return err return err
} }
// #nosec G304
f, err := os.Create(outputFile) f, err := os.Create(outputFile)
if err != nil { if err != nil {
return err return err
} }
defer f.Close() defer func() { _ = f.Close() }()
yamlEncoder := yaml.NewEncoder(f) yamlEncoder := yaml.NewEncoder(f)
yamlEncoder.SetIndent(2) yamlEncoder.SetIndent(2)

6
go.mod
View File

@ -3,8 +3,8 @@ module git.cryptic.systems/volker.raschek/dcmerge
go 1.20 go 1.20
require ( require (
github.com/spf13/cobra v1.9.1 github.com/spf13/cobra v1.10.1
github.com/stretchr/testify v1.10.0 github.com/stretchr/testify v1.11.1
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
) )
@ -12,5 +12,5 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.6 // indirect github.com/spf13/pflag v1.0.9 // indirect
) )

12
go.sum
View File

@ -6,12 +6,12 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@ -5,5 +5,5 @@ import "git.cryptic.systems/volker.raschek/dcmerge/cmd"
var version string var version string
func main() { func main() {
cmd.Execute(version) _ = cmd.Execute(version)
} }

View File

@ -1305,8 +1305,8 @@ func (sdoc *DependsOnContainer) Equal(equalable Equalable) bool {
// MarshalYAML implements the MarshalYAML interface to customize the behavior when being marshaled into a YAML document. // MarshalYAML implements the MarshalYAML interface to customize the behavior when being marshaled into a YAML document.
func (sdoc *DependsOnContainer) MarshalYAML() (interface{}, error) { func (sdoc *DependsOnContainer) MarshalYAML() (interface{}, error) {
var foundAnotherCondition bool = false var foundAnotherCondition = false
var dependencyNames []string var dependencyNames = make([]string, 0)
for dependencyName, dependencyDefinition := range sdoc.DependsOn { for dependencyName, dependencyDefinition := range sdoc.DependsOn {
if dependencyDefinition.Condition == ServiceDependsOnConditionServiceStarted { if dependencyDefinition.Condition == ServiceDependsOnConditionServiceStarted {

View File

@ -55,8 +55,8 @@ func EqualStringMap[R Equalable](mapA, mapB map[string]R) bool {
// ExistsInMap returns true if object of type any exists under the passed name. // ExistsInMap returns true if object of type any exists under the passed name.
func ExistsInMap[T any](m map[string]T, name string) bool { func ExistsInMap[T any](m map[string]T, name string) bool {
switch { switch m {
case m == nil: case nil:
return false return false
default: default:
_, present := m[name] _, present := m[name]

View File

@ -20,15 +20,15 @@ func Fetch(urls ...string) ([]*dockerCompose.Config, error) {
return nil, err return nil, err
} }
switch { switch dockerComposeURL.Scheme {
case dockerComposeURL.Scheme == "http" || dockerComposeURL.Scheme == "https": case "http", "https":
dockerComposeConfig, err := getDockerComposeViaHTTP(dockerComposeURL.String()) dockerComposeConfig, err := getDockerComposeViaHTTP(dockerComposeURL.String())
if err != nil { if err != nil {
return nil, err return nil, err
} }
dockerComposeConfigs = append(dockerComposeConfigs, dockerComposeConfig) dockerComposeConfigs = append(dockerComposeConfigs, dockerComposeConfig)
case dockerComposeURL.Scheme == "file": case "file":
fallthrough fallthrough
default: default:
dockerComposeConfig, err := readDockerComposeFromFile(dockerComposeURL.Path) dockerComposeConfig, err := readDockerComposeFromFile(dockerComposeURL.Path)
@ -43,7 +43,7 @@ func Fetch(urls ...string) ([]*dockerCompose.Config, error) {
return dockerComposeConfigs, nil return dockerComposeConfigs, nil
} }
var ErrorPathIsDir error = errors.New("Path is a directory") var ErrPathIsDir error = errors.New("path is a directory")
func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) { func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) {
req, err := http.NewRequest(http.MethodGet, url, nil) req, err := http.NewRequest(http.MethodGet, url, nil)
@ -55,10 +55,10 @@ func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer resp.Body.Close() defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("Received unexpected HTTP-Statuscode %v", resp.StatusCode) return nil, fmt.Errorf("received unexpected HTTP-Statuscode %v", resp.StatusCode)
} }
dockerCompose := dockerCompose.NewConfig() dockerCompose := dockerCompose.NewConfig()
@ -78,14 +78,15 @@ func readDockerComposeFromFile(name string) (*dockerCompose.Config, error) {
case err != nil: case err != nil:
return nil, err return nil, err
case fileStat.IsDir(): case fileStat.IsDir():
return nil, fmt.Errorf("%w: %s", ErrorPathIsDir, name) return nil, fmt.Errorf("%w: %s", ErrPathIsDir, name)
} }
// #nosec G304
file, err := os.Open(name) file, err := os.Open(name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer file.Close() defer func() { _ = file.Close() }()
dockerCompose := dockerCompose.NewConfig() dockerCompose := dockerCompose.NewConfig()