File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed
Expand file tree Collapse file tree 4 files changed +14
-8
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4646 with :
4747 persist-credentials : false
4848 - name : Set quay.io org name
Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ jobs:
2424 runs-on : ubuntu-latest
2525 steps :
2626 - name : Checkout repository
27- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2828 with :
2929 persist-credentials : false
3030 - name : Install Go
31- uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0 .0
31+ uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1 .0
3232 with :
3333 go-version : 1.25.x
3434 - name : Install snmp_exporter/generator dependencies
3838 id : golangci-lint-version
3939 run : echo "version=$(make print-golangci-lint-version)" >> $GITHUB_OUTPUT
4040 - name : Lint
41- uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0 .0
41+ uses : golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2 .0
4242 with :
4343 args : --verbose
4444 version : ${{ steps.golangci-lint-version.outputs.version }}
Original file line number Diff line number Diff line change 1111 if : github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
1212 runs-on : ubuntu-latest
1313 steps :
14- - uses : actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
14+ - uses : actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1
1515 with :
1616 repo-token : ${{ secrets.GITHUB_TOKEN }}
1717 # opt out of defaults to avoid marking issues as stale and closing them
Original file line number Diff line number Diff line change 1- # Copyright 2018 The Prometheus Authors
1+ # Copyright The Prometheus Authors
22# Licensed under the Apache License, Version 2.0 (the "License");
33# you may not use this file except in compliance with the License.
44# You may obtain a copy of the License at
@@ -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.6 .2
64+ GOLANGCI_LINT_VERSION ?= v2.7 .2
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.
@@ -129,6 +129,12 @@ common-check_license:
129129 echo "license header checking failed:"; echo "$${licRes}"; \
130130 exit 1; \
131131 fi
132+ @echo ">> checking for copyright years 2026 or later"
133+ @futureYearRes=$$(git grep -E 'Copyright (202[6-9]|20[3-9][0-9])' -- '*.go' ':!:vendor/*' || true); \
134+ if [ -n "$${futureYearRes}" ]; then \
135+ echo "Files with copyright year 2026 or later found (should use 'Copyright The Prometheus Authors'):"; echo "$${futureYearRes}"; \
136+ exit 1; \
137+ fi
132138
133139.PHONY: common-deps
134140common-deps:
You can’t perform that action at this time.
0 commit comments