linter.yml 692 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Linter
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - v*
  7. paths:
  8. - "**/*.go"
  9. - ".github/workflows/linter.yml"
  10. pull_request:
  11. types: [opened, synchronize, reopened]
  12. paths:
  13. - "**/*.go"
  14. - ".github/workflows/linter.yml"
  15. jobs:
  16. lint:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Set up Go 1.x
  20. uses: actions/setup-go@v2
  21. with:
  22. go-version: ^1.16
  23. - name: Checkout codebase
  24. uses: actions/checkout@v2
  25. - name: golangci-lint
  26. uses: golangci/golangci-lint-action@v2.5.1
  27. with:
  28. version: latest
  29. args: --config=.github/linters/.golangci.yml
  30. only-new-issues: true