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
This commit is contained in:
Quentin McGaw 2025-02-17 12:34:52 +01:00 committed by GitHub
parent 53867ac3f1
commit 1344d20908
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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