linter.yml 740 B

1234567891011121314151617181920212223242526272829303132333435
  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. if: github.repository == 'v2fly/v2ray-core'
  18. runs-on: ubuntu-latest
  19. steps:
  20. - name: Set up Go 1.x
  21. uses: actions/setup-go@v2
  22. with:
  23. go-version: ^1.17
  24. - name: Checkout codebase
  25. uses: actions/checkout@v2
  26. - name: golangci-lint
  27. uses: golangci/golangci-lint-action@v2.5.2
  28. with:
  29. version: latest
  30. args: --config=.github/linters/.golangci.yml
  31. only-new-issues: true