From 4c9a34b15a8a62532497f2786bc111973d226a70 Mon Sep 17 00:00:00 2001 From: Aurora Gaffney Date: Thu, 12 Oct 2023 19:29:45 -0500 Subject: [PATCH] ci: update golangci-lint --- .github/workflows/golangci-lint.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index f6d88bb..401431f 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -9,23 +9,25 @@ on: branches: - main pull_request: + permissions: contents: read - # Optional: allow read access to pull request. Use with `only-new-issues` option. - # pull-requests: read + pull-requests: read + jobs: golangci: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: 1.20.x + cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.53.3 # current version at time of commit - args: --timeout 10m - only-new-issues: true + version: v1.54 # current version at time of commit + args: --timeout=10m + # Only show new issues in a PR but show all issues for pushes + only-new-issues: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}