🌱 Bump github.com/golangci/golangci-lint in /tools (#3592) #998
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: golangci-lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pull-requests: read # Use with `only-new-issues` option. | |
env: | |
GO_VERSION: 1.21 | |
jobs: | |
golangci: | |
name: check-linter | |
runs-on: ubuntu-latest | |
steps: | |
- uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false # golangci-lint maintains its own cache | |
- name: set golangci-lint version # keep in sync with tools/go.mod | |
run: | | |
echo "GOLANGCI_LINT_VERSION=$(cd tools; go list -m -f '{{ .Version }}' github.com/golangci/golangci-lint)" >> "$GITHUB_ENV" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 | |
with: | |
version: ${{ env.GOLANGCI_LINT_VERSION }} | |
only-new-issues: true |