diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 53bbb1d6b6e1..6c7b168cca5f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -43,11 +43,12 @@ jobs: - run: git diff --exit-code - 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