From 1344d20908f37631e7475de4e06b47361e5a41f2 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 17 Feb 2025 12:34:52 +0100 Subject: [PATCH] chore(ci): disable lint goheader step on non-pull-request events (#143) - Pin golangci-lint action to v6 now that goheader doesn't run on the default branch pushes - This addresses the goheader step misbehaving and linting all files on pushes --- .github/workflows/lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 053b590571..67428073c8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -34,11 +34,12 @@ jobs: with: go-version-file: "go.mod" - name: goheader + if: ${{ github.event_name == 'pull_request' }} # The goheader linter is only enabled in the CI so that it runs only on modified or new files # (see only-new-issues: true). It is disabled in .golangci.yml because # golangci-lint running locally is not aware of new/modified files compared to the base # commit of a pull request, and we want to avoid reporting invalid goheader errors. - uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 since v6.3.1 does not handle `only-new-issues` correctly + uses: golangci/golangci-lint-action@v6 with: version: v1.60 only-new-issues: true