diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e917f47..bee0cab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,20 +1,28 @@ name: lint -on: [push, pull_request] +on: + push: + pull_request: + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + pull-requests: read jobs: golangci: - name: lint + name: lint-soft runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: ^1 + + - uses: actions/checkout@v3 - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: - # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.30 # Optional: golangci-lint command line arguments. args: --issues-exit-code=0 - # Optional: working directory, useful for monorepos - # working-directory: somedir # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true