Skip to content

Commit c569181

Browse files
authored
Merge pull request #26 from axoflow/chore/update-repo
chore: update repo
2 parents 72f25f4 + b181022 commit c569181

10 files changed

+84
-162
lines changed

.github/workflows/artifacts.yaml

+13-11
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ jobs:
4949

5050
steps:
5151
- name: Checkout repository
52-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
52+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5353

5454
- name: Set up QEMU
55-
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
55+
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
5656

5757
- name: Set up Docker Buildx
58-
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1
58+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
5959

6060
- name: Set image name
6161
id: image-name
6262
run: echo "value=ghcr.io/${{ github.repository }}" >> "$GITHUB_OUTPUT"
6363

6464
- name: Gather build metadata
6565
id: meta
66-
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0
66+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
6767
with:
6868
images: ${{ steps.image-name.outputs.value }}
6969
flavor: |
@@ -75,15 +75,15 @@ jobs:
7575
# Multiple exporters are not supported yet
7676
# See https://github.com/moby/buildkit/pull/2760
7777
- name: Determine build output
78-
uses: haya14busa/action-cond@1d6e8a12b20cdb4f1954feef9aa475b9c390cab5 # v1.1.1
78+
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
7979
id: build-output
8080
with:
8181
cond: ${{ inputs.publish }}
8282
if_true: type=image,push=true
8383
if_false: type=oci,dest=image.tar
8484

8585
- name: Login to GitHub Container Registry
86-
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
86+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
8787
with:
8888
registry: ghcr.io
8989
username: ${{ github.actor }}
@@ -92,7 +92,7 @@ jobs:
9292

9393
- name: Build and push image
9494
id: build
95-
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
95+
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
9696
with:
9797
context: .
9898
platforms: linux/amd64,linux/arm64
@@ -116,21 +116,23 @@ jobs:
116116
tar -xf image.tar -C image
117117
118118
- name: Run Trivy vulnerability scanner
119-
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 # 0.11.2
119+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
120+
env:
121+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
122+
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1
120123
with:
121124
input: image
122125
format: sarif
123126
output: trivy-results.sarif
124127

125128
- name: Upload Trivy scan results as artifact
126-
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
129+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
127130
with:
128131
name: "[${{ github.job }}] Trivy scan results"
129132
path: trivy-results.sarif
130133
retention-days: 5
131134

132135
- name: Upload Trivy scan results to GitHub Security tab
133-
uses: github/codeql-action/upload-sarif@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0
136+
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
134137
with:
135138
sarif_file: trivy-results.sarif
136-

.github/workflows/go-lint-and-test.yml

+49-38
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,64 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
check-license:
11-
name: Check licenses
10+
license-check:
11+
name: License check
1212
runs-on: ubuntu-latest
13+
1314
steps:
14-
- name: Set up Go
15-
uses: actions/setup-go@v3
16-
with:
17-
go-version: '1.23'
18-
- name: Check out code
19-
uses: actions/checkout@v3
20-
- name: Cache licenses
21-
uses: actions/cache@v3
22-
with:
23-
key: licensei-cache-${{ hashFiles('go.sum') }}
24-
path: ".licensei.cache"
25-
restore-keys: licensei-cache
26-
- name: Ensure licensei cache
27-
env:
28-
GITHUB_TOKEN: ${{ github.token }}
29-
run: make .licensei.cache
30-
- name: Run license check
31-
run: make check-license
15+
- name: Checkout code
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
20+
with:
21+
go-version-file: '.go-version'
22+
23+
- name: Cache licenses
24+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
25+
with:
26+
key: licensei-cache-${{ hashFiles('go.sum') }}
27+
path: ".licensei.cache"
28+
restore-keys: licensei-cache
29+
30+
- name: Ensure licensei cache
31+
env:
32+
GITHUB_TOKEN: ${{ github.token }}
33+
run: make .licensei.cache
34+
35+
- name: Run license check
36+
run: make check-license
3237

3338
run-test:
3439
name: Go tests
3540
runs-on: ubuntu-latest
41+
3642
steps:
37-
- name: Set up Go
38-
uses: actions/setup-go@v3
39-
with:
40-
go-version: '1.23'
41-
- name: Check out code
42-
uses: actions/checkout@v3
43-
- name: Run tests
44-
run: make test
43+
- name: Checkout code
44+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
46+
- name: Set up Go
47+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
48+
with:
49+
go-version-file: '.go-version'
50+
51+
- name: Run tests
52+
run: make test
4553

4654
run-lint:
4755
name: Go lint
4856
runs-on: ubuntu-latest
57+
4958
steps:
50-
- name: Set up Go
51-
uses: actions/setup-go@v3
52-
with:
53-
go-version: '1.23'
54-
- name: Check out code
55-
uses: actions/checkout@v3
56-
- name: Run lint
57-
run: make lint
58-
env:
59-
LINTER_FLAGS: '--timeout 5m'
59+
- name: Checkout code
60+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
62+
- name: Set up Go
63+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
64+
with:
65+
go-version-file: '.go-version'
66+
67+
- name: Lint
68+
run: make lint
69+
env:
70+
LINTER_FLAGS: '--timeout 5m'

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ dist/
2424
.vscode
2525
.garden
2626
.licensei.cache
27+
go.work.sum

.go-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.23.5

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-bullseye as builder
1+
FROM golang:1.23-bullseye@sha256:462521f1b7cbf410002a8cc4d91bc897f35cd430854d7240596282f9441fe4a7 as builder
22

33
RUN apt-get update \
44
&& apt-get install --yes entr \

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ GO_LDFLAGS := -X 'main.Version=${GIT_TAG}'
1111
BIN ?= ${PWD}/bin/${GOOS}/${GOARCH}
1212

1313
LICENSEI := ${BIN}/licensei
14-
LICENSEI_VERSION = v0.8.0
14+
LICENSEI_VERSION = v0.9.0
1515
GOLANGCI_LINT := ${BIN}/golangci-lint
16-
GOLANGCI_LINT_VERSION := v1.61.0
16+
GOLANGCI_LINT_VERSION := v1.63.4
1717

1818
.PHONY: fmt
1919
fmt: ## format Go sources

go.mod

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
module github.com/axoflow/axosyslog-metrics-exporter
22

3-
go 1.22.0
4-
5-
toolchain go1.23.1
3+
go 1.23.5
64

75
replace github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl => ./pkg/syslog-ng-ctl
86

97
require (
10-
github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl v0.0.0-20240731091211-4160b5cc192f
11-
github.com/prometheus/common v0.60.0
12-
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
8+
github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl v0.0.0-20241004091155-72f25f49e310
9+
github.com/prometheus/common v0.62.0
10+
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c
1311
)
1412

1513
require (
1614
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
1715
github.com/prometheus/client_model v0.6.1 // indirect
18-
github.com/prometheus/prometheus v0.54.1 // indirect
19-
google.golang.org/protobuf v1.34.2 // indirect
16+
github.com/prometheus/prometheus v0.301.0 // indirect
17+
google.golang.org/protobuf v1.36.4 // indirect
2018
)

go.sum

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
88
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
99
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
1010
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
11-
github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA=
12-
github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
13-
github.com/prometheus/prometheus v0.54.1 h1:vKuwQNjnYN2/mDoWfHXDhAsz/68q/dQDb+YbcEqU7MQ=
14-
github.com/prometheus/prometheus v0.54.1/go.mod h1:xlLByHhk2g3ycakQGrMaU8K7OySZx98BzeCR99991NY=
15-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
16-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
17-
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
18-
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
19-
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
20-
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
11+
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
12+
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
13+
github.com/prometheus/prometheus v0.301.0 h1:0z8dgegmILivNomCd79RKvVkIols8vBGPKmcIBc7OyY=
14+
github.com/prometheus/prometheus v0.301.0/go.mod h1:BJLjWCKNfRfjp7Q48DrAjARnCi7GhfUVvUFEAWTssZM=
15+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
16+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
17+
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc=
18+
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
19+
google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM=
20+
google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
2121
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2222
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

go.work

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
go 1.22.0
2-
3-
toolchain go1.23.1
1+
go 1.23.5
42

53
use .
64

go.work.sum

-89
This file was deleted.

0 commit comments

Comments
 (0)