Compare commits

1 Commits

Author SHA1 Message Date
f632075ca0 chore(deps): update actions/checkout action to v4.3.0
Some checks failed
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 14s
Markdown linter / markdown-lint (push) Successful in 4s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (pull_request) Successful in 5s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (pull_request) Failing after 7s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Failing after 24s
Markdown linter / markdown-lint (pull_request) Successful in 3s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 53s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Failing after 22s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (pull_request) Successful in 16s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (pull_request) Failing after 21s
2025-08-11 13:13:38 +00:00
12 changed files with 104 additions and 83 deletions

View File

@ -1,4 +1,4 @@
name: "Run Golang tests"
name: Golang Tests
on:
pull_request:
@ -6,27 +6,9 @@ on:
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
jobs:
# integration-test:
# name: "Run integration tests"
# 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"
unittest:
runs-on: ${{ matrix.os }}
strategy:
matrix:

View File

@ -1,4 +1,4 @@
name: "Lint Golang files"
name: Golang CI lint
on:
pull_request:
@ -6,14 +6,12 @@ on:
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
permissions:
contents: read
jobs:
golangci:
name: "Run golang CI linter"
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -26,4 +24,4 @@ jobs:
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
version: v2.1

View File

@ -1,17 +1,17 @@
name: "Lint Markdown files"
name: Markdown linter
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '*' ]
tags-ignore: [ '*' ]
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
jobs:
markdown-lint:
name: "Run markdown linter"
runs-on: ubuntu-latest
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4.3.0
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0

View File

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

View File

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

27
.golangci.yml Normal file
View File

@ -0,0 +1,27 @@
run:
timeout: 10m
tests: true
linters:
disable-all: true
enable:
# Default
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
# Additionally linters
- bodyclose
- misspell
- nilerr
- rowserrcheck
- sqlclosecheck
- unparam
- whitespace

View File

@ -30,7 +30,6 @@ builds:
- amd64
- arm
- arm64
- riscv64
goarm:
- "6"
- "7"
@ -140,25 +139,6 @@ dockers:
skip_push: false
use: buildx
- 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
docker_manifests:
- name_template: 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}'
image_templates:
@ -166,7 +146,6 @@ docker_manifests:
- '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'
gitea_urls:
api: https://git.cryptic.systems/api/v1

View File

@ -56,6 +56,8 @@ MD013:
tables: false
# Include headings
headings: true
# Include headings
headers: true
# Strict length checking
strict: false
# Stern length checking
@ -68,6 +70,11 @@ MD022:
# Blank lines below heading
lines_below: 1
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
MD024:
# Only check sibling headings
allow_different_nesting: true
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
MD025:
# Heading level

View File

@ -2,7 +2,7 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/volkerraschek/getpsrc)](https://hub.docker.com/r/volkerraschek/getpsrc)
`getpsrc` is a small program to determine the src routing ip for an external ip.
`getpsrc` is a small programme to determine the src routing ip for an external ip.
`getpsrc` serves as an alternative to `ip route get <ip> | awk ...` because `ip
route get` can return different output depending on the environment and therefore the construct is unsafe.

View File

@ -36,8 +36,5 @@ func main() {
log.Fatalf("failed to find gateway for ip: %v", err.Error())
}
_, err = fmt.Fprintln(os.Stdout, prefferedSrc.String())
if err != nil {
log.Fatalf("failed to print gateway on stdout: %v", err.Error())
}
fmt.Fprintln(os.Stdout, prefferedSrc.String())
}

View File

@ -1,10 +1,54 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>volker.raschek/renovate-config:default#master",
"local>volker.raschek/renovate-config:container#master",
"local>volker.raschek/renovate-config:actions#master",
"local>volker.raschek/renovate-config:golang#master",
"local>volker.raschek/renovate-config:regexp#master"
]
"assigneesFromCodeOwners": true,
"labels": [ "renovate" ],
"packageRules": [
{
"description": "Automatically update minor and patch versions of container images",
"addLabels": [ "renovate/container-images", "renovate/automerge" ],
"automerge": true,
"matchDatasources":[ "docker" ],
"matchUpdateTypes": [ "minor", "patch"]
},
{
"description": "Prepare MR for major update of container images",
"addLabels": [ "renovate/container-images", "renovate/automerge" ],
"automerge": false,
"matchDatasources":[ "docker" ],
"matchUpdateTypes": [ "major"]
},
{
"description": "Automatically update minor and patch versions of used drone-ci images",
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
"automerge": true,
"matchManagers": "droneci",
"matchUpdateTypes": [ "minor", "patch"]
},
{
"description": "Prepare MR for major update of used drone-ci images",
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
"automerge": false,
"matchManagers": "droneci",
"matchUpdateTypes": [ "major"]
},
{
"description": "Automatically update minor and patch versions of go modules",
"addLabels": [ "renovate/gomod", "renovate/automerge" ],
"automerge": true,
"matchManagers": [ "gomod" ],
"matchUpdateTypes": [ "minor", "patch" ]
},
{
"description": "Prepare MR for major update of go modules",
"addLabels": [ "renovate/gomod" ],
"automerge": false,
"matchManagers": [ "gomod" ],
"matchUpdateTypes": [ "major" ]
}
],
"postUpdateOptions": [
"gomodTidy"
],
"rebaseLabel": "renovate/rebase",
"rebaseWhen": "behind-base-branch"
}