12 Commits

Author SHA1 Message Date
4151ae3770 Merge pull request 'chore(deps): update goreleaser/goreleaser-action action to v6.4.0' (#85) from renovate/actions into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 11s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 51s
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 32s
2025-08-14 16:23:21 +00:00
a7af92e0f9 chore(deps): update goreleaser/goreleaser-action action to v6.4.0
All checks were successful
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 11s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 1m42s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 42s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 30s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 39s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 30s
2025-08-14 16:13:33 +00:00
859b741108 Merge pull request 'chore(deps): update dependency go to v1.25.0' (#83) from renovate/go-modules into master
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 11s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 39s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m7s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 31s
2025-08-14 04:15:07 +00:00
06ceef2de8 chore(deps): update dependency go to v1.25.0
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 17s
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 8s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 57s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m0s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 32s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 41s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 31s
2025-08-14 04:12:14 +00:00
12611efc28 Merge pull request 'chore(deps): update dependency golangci/golangci-lint to v2.4.0' (#84) 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 11s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 1m2s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 42s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 31s
2025-08-14 01:36:04 +00:00
ef340f50b5 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 37s
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 20s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 3m9s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m59s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 1m19s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 38s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 30s
2025-08-14 01:13:35 +00:00
3438cb04a8 Merge pull request 'chore(deps): update dependency golangci/golangci-lint to v2.3.1' (#82) 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 16s
Lint Markdown files / Run markdown linter (push) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m15s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 51s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 2m26s
2025-08-12 19:09:48 +00:00
2d343b6c70 chore(deps): update dependency golangci/golangci-lint to v2.3.1
All checks were successful
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (pull_request) Successful in 14s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (pull_request) Successful in 8s
Lint Markdown files / Run markdown linter (pull_request) Successful in 4s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m13s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 51s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 3m3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (pull_request) Successful in 1m16s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (pull_request) Successful in 50s
2025-08-12 16:27:03 +00:00
878a0194ae fix(golangci): be compliant with golangci-linter
All checks were successful
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Successful in 16s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Successful in 1m15s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 51s
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 2m25s
2025-08-12 16:52:25 +02:00
95f3b6b56f fix(ci): rename workflows; add golang ci lint
Some checks failed
Run Golang tests / Run unit tests (stable, ubuntu-latest-amd64) (push) Successful in 8s
Lint Markdown files / Run markdown linter (push) Successful in 3s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-amd64) (push) Failing after 2m9s
Lint Golang files / Run golang CI linter (stable, ubuntu-latest-arm64) (push) Failing after 49s
Run Golang tests / Run unit tests (stable, ubuntu-latest-arm64) (push) Successful in 50s
2025-08-12 09:29:02 +02:00
7d95e6407e Merge pull request 'chore(deps): update actions/checkout action to v4.3.0' (#80) from renovate/actions into master
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 7s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 10s
Lint Markdown files / markdown-lint (push) Successful in 8s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 52s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 58s
2025-08-11 14:23:03 +00:00
6f5dbbba3f chore(deps): update actions/checkout action to v4.3.0
All checks were successful
Golang Tests / unittest (stable, ubuntu-latest-amd64) (push) Successful in 37s
Golang Tests / unittest (stable, ubuntu-latest-amd64) (pull_request) Successful in 7s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (pull_request) Successful in 21s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Golang CI lint / golangci (stable, ubuntu-latest-amd64) (push) Successful in 3m32s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (push) Successful in 50s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (push) Successful in 1m13s
Golang Tests / unittest (stable, ubuntu-latest-arm64) (pull_request) Successful in 55s
Golang CI lint / golangci (stable, ubuntu-latest-arm64) (pull_request) Successful in 53s
2025-08-11 13:22:10 +00:00
10 changed files with 63 additions and 28 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
prometheus-fail2ban-exporter

View File

@ -1,15 +1,13 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
# Editor configuration, see http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = false
trim_trailing_whitespace = true
[Makefile]
[{Makefile,*.go}]
indent_style = tab

View File

@ -1,4 +1,4 @@
name: Golang CI lint
name: "Lint Golang files"
on:
pull_request:
@ -6,22 +6,24 @@ on:
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@v5.0.0
- 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.1
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:
pull_request:
@ -6,16 +6,34 @@ on:
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
jobs:
unittest:
# 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"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v4.3.0
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}

View File

@ -1,4 +1,4 @@
name: 'Lint Markdown files'
name: "Lint Markdown files"
on:
pull_request:
@ -6,13 +6,14 @@ on:
push:
branches: [ '*' ]
tags-ignore: [ '*' ]
workflow_dispatch: {}
jobs:
markdown-lint:
runs-on:
- ubuntu-latest
name: "Run markdown linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v4.3.0
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
with:
globs: '**/*.md'

View File

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

View File

@ -11,7 +11,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: actions/checkout@v4.3.0
- uses: peter-evans/dockerhub-description@v4.0.2
with:
username: ${{ secrets.DOCKER_IO_USERNAME }}

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

@ -37,6 +37,7 @@ func (c *Collector) collectFileContents() {
}
fullPath := filepath.Join(c.folderPath, fileName)
// #nosec G304
content, err := os.ReadFile(fullPath)
if err != nil {
c.appendErrorForPath(fileName)

2
go.mod
View File

@ -2,7 +2,7 @@ module git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter
go 1.23.0
toolchain go1.24.6
toolchain go1.25.0
require (
github.com/alecthomas/kong v1.12.1