name: Run lint on: [ push, pull_request ] permissions: contents: read jobs: lint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Update Go uses: actions/setup-go@v7.0.0 with: go-version: '>=1.21.0' cache: false - name: Lint uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: # version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version # # We are not using "latest" because it was a source of random CI # failures when new checks were added. It should also provide some # protection against supply-chain attacks because "the tags of # golangci-lint cannot be updated, removed: we have a tag protection" # (Ludovic Fernandez, golangci-lint maintainer). # # Would be nice to get it auto-updated via dependabot, though :-/ version: v2.11.4 # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true # Read args from .golangci.yaml # args: