From af8450a90383a7de46931043e0b573c69b374edc Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 7 Jul 2022 17:03:42 +0200 Subject: [PATCH] ci: update lint workflow --- .github/workflows/lint.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) 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