diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000..7ac22bcb3 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,24 @@ +name: Lint +on: + pull_request: + push: + branches: + - master +jobs: + golangci: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: technote-space/get-diff-action@v4 + with: + PATTERN: | + .go + .mod + .sum + - uses: golangci/golangci-lint-action@v2 + with: + # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. + args: -e SA1019 --timeout 10m + github-token: ${{ secrets.GITHUB_TOKEN }} + if: "env.GIT_DIFF != ''"