diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b61e1af --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: linting + +on: + pull_request: + branches: [ "main" ] + paths-ignore: + - 'docs/**' + - '**.md' + - 'sec-scanners-config.yaml' + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + pull-requests: read + +jobs: + linting: + runs-on: ubuntu-latest + steps: + - name: Setup go environment + uses: actions/setup-go@v5 + with: + go-version: '1.21' + cache: false + + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Run linting + uses: golangci/golangci-lint-action@v3 + with: + version: v1.55 + args: --timeout=5m --config=./.golanci.yaml