File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 1818 if : github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
1919 steps :
2020 - name : git checkout
21- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2222 with :
2323 persist-credentials : false
2424 - name : Set docker hub repo name
4242 if : github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
4343 steps :
4444 - name : git checkout
45- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
45+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4646 with :
4747 persist-credentials : false
4848 - name : Set quay.io org name
Original file line number Diff line number Diff line change @@ -24,16 +24,21 @@ jobs:
2424 runs-on : ubuntu-latest
2525 steps :
2626 - name : Checkout repository
27- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+ with :
29+ persist-credentials : false
2830 - name : Install Go
2931 uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
3032 with :
31- go-version : 1.24 .x
33+ go-version : 1.25 .x
3234 - name : Install snmp_exporter/generator dependencies
3335 run : sudo apt-get update && sudo apt-get -y install libsnmp-dev
3436 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
3540 - name : Lint
36- uses : golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7 .0.0
41+ uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 .0.0
3742 with :
3843 args : --verbose
39- version : v2.1.5
44+ version : ${{ steps.golangci-lint-version.outputs.version }}
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
6161SKIP_GOLANGCI_LINT :=
6262GOLANGCI_LINT :=
6363GOLANGCI_LINT_OPTS ?=
64- GOLANGCI_LINT_VERSION ?= v2.1.5
64+ GOLANGCI_LINT_VERSION ?= v2.4.0
6565GOLANGCI_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)
267267endif
268268
269+ .PHONY: common-print-golangci-lint-version
270+ common-print-golangci-lint-version:
271+ @echo $(GOLANGCI_LINT_VERSION)
272+
269273.PHONY: precheck
270274precheck::
271275
You can’t perform that action at this time.
0 commit comments