| 1 |
name: Run lint |
| 2 |
|
| 3 |
on: [ push, pull_request ] |
| 4 |
|
| 5 |
permissions: |
| 6 |
contents: read |
| 7 |
|
| 8 |
jobs: |
| 9 |
lint: |
| 10 |
runs-on: ubuntu-latest |
| 11 |
steps: |
| 12 |
- name: Checkout code |
| 13 |
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 14 |
- name: Update Go |
| 15 |
uses: actions/[email protected] |
| 16 |
with: |
| 17 |
go-version: '>=1.21.0' |
| 18 |
cache: false |
| 19 |
- name: Lint |
| 20 |
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 |
| 21 |
with: |
| 22 |
# version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version |
| 23 |
# |
| 24 |
# We are not using "latest" because it was a source of random CI |
| 25 |
# failures when new checks were added. It should also provide some |
| 26 |
# protection against supply-chain attacks because "the tags of |
| 27 |
# golangci-lint cannot be updated, removed: we have a tag protection" |
| 28 |
# (Ludovic Fernandez, golangci-lint maintainer). |
| 29 |
# |
| 30 |
# Would be nice to get it auto-updated via dependabot, though :-/ |
| 31 |
version: v2.11.4 |
| 32 |
|
| 33 |
# Optional: show only new issues if it's a pull request. The default value is `false`. |
| 34 |
# only-new-issues: true |
| 35 |
|
| 36 |
# Read args from .golangci.yaml |
| 37 |
# args: |