Skip to content

Commit 447cfe0

Browse files
upgrade golancilint
Signed-off-by: Ramon Petgrave <[email protected]>
1 parent 5f8b841 commit 447cfe0

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/pre-submit.lint.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,28 @@ jobs:
8080
- run: make markdownlint
8181

8282
golangci-lint:
83-
permissions:
84-
checks: write # allow annotations in PRs.
8583
runs-on: ubuntu-latest
8684
steps:
8785
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
8886
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
8987
with:
90-
# go-version-file: "go.mod"
91-
go-version: 1.22
92-
# not needed but gets rid of warnings
93-
cache: false
94-
- uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
95-
name: golangci-lint
96-
with:
97-
install-mode: goinstall
98-
version: v1.60.3
88+
go-version-file: "go.mod"
89+
- env:
90+
GOLANGCI_LINT_VERSION: "1.60.3"
91+
GOLANGCI_LINT_CHECKSUM: "4037af8122871f401ed874852a471e54f147ff8ce80f5a304e020503bdb806ef"
92+
run: |
93+
set -euo pipefail
94+
95+
#Install golangci-lint
96+
curl -sSLo golangci-lint.tar.gz "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz"
97+
echo "golangci-lint checksum is $(sha256sum golangci-lint.tar.gz | awk '{ print $1 }')"
98+
echo "expected checksum is $GOLANGCI_LINT_CHECKSUM"
99+
echo "$GOLANGCI_LINT_CHECKSUM golangci-lint.tar.gz" | sha256sum --strict --check --status || exit 1
100+
tar xf golangci-lint.tar.gz
101+
mv "golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64/golangci-lint" /usr/local/bin
102+
103+
# Run golangci-lint
104+
make golangci-lint
99105
100106
shellcheck:
101107
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)