1
0

golangci-lint.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: golangci-lint
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - dev
  7. pull_request:
  8. permissions:
  9. contents: read
  10. # Optional: allow read access to pull request. Use with `only-new-issues` option.
  11. pull-requests: read
  12. jobs:
  13. golangci:
  14. name: lint
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v4
  18. - uses: actions/setup-go@v5
  19. with:
  20. go-version: '1.23'
  21. cache: false
  22. - name: golangci-lint
  23. uses: golangci/golangci-lint-action@v4
  24. with:
  25. # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
  26. version: v1.61
  27. # Optional: golangci-lint command line arguments.
  28. # args: --issues-exit-code=0
  29. # Optional: show only new issues if it's a pull request. The default value is `false`.
  30. # only-new-issues: true
  31. # Optional: if set to true then the all caching functionality will be complete disabled,
  32. # takes precedence over all other caching options.
  33. # skip-cache: true
  34. # Optional: if set to true then the action don't cache or restore ~/go/pkg.
  35. # skip-pkg-cache: true
  36. # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
  37. # skip-build-cache: true