Skip to content

Commit 648db33

Browse files
committed
Update common Prometheus files
Signed-off-by: prombot <[email protected]>
1 parent 84eeb59 commit 648db33

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ jobs:
2828
with:
2929
persist-credentials: false
3030
- name: Install Go
31-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
31+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3232
with:
3333
go-version: 1.25.x
3434
- name: Install snmp_exporter/generator dependencies
3535
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
3636
if: github.repository == 'prometheus/snmp_exporter'
37+
- name: Get golangci-lint version
38+
id: golangci-lint-version
39+
run: echo "version=$(make print-golangci-lint-version)" >> $GITHUB_OUTPUT
3740
- name: Lint
3841
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3942
with:
4043
args: --verbose
41-
version: v2.2.1
44+
version: ${{ steps.golangci-lint-version.outputs.version }}

Makefile.common

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
6161
SKIP_GOLANGCI_LINT :=
6262
GOLANGCI_LINT :=
6363
GOLANGCI_LINT_OPTS ?=
64-
GOLANGCI_LINT_VERSION ?= v2.2.1
64+
GOLANGCI_LINT_VERSION ?= v2.4.0
6565
GOLANGCI_FMT_OPTS ?=
6666
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
6767
# windows isn't included here because of the path separator being different.
@@ -266,6 +266,10 @@ $(GOLANGCI_LINT):
266266
| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
267267
endif
268268

269+
.PHONY: common-print-golangci-lint-version
270+
common-print-golangci-lint-version:
271+
@echo $(GOLANGCI_LINT_VERSION)
272+
269273
.PHONY: precheck
270274
precheck::
271275

0 commit comments

Comments
 (0)