Skip to content

Commit 1344d20

Browse files
authored
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
1 parent 53867ac commit 1344d20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ jobs:
3434
with:
3535
go-version-file: "go.mod"
3636
- name: goheader
37+
if: ${{ github.event_name == 'pull_request' }}
3738
# The goheader linter is only enabled in the CI so that it runs only on modified or new files
3839
# (see only-new-issues: true). It is disabled in .golangci.yml because
3940
# golangci-lint running locally is not aware of new/modified files compared to the base
4041
# commit of a pull request, and we want to avoid reporting invalid goheader errors.
41-
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 since v6.3.1 does not handle `only-new-issues` correctly
42+
uses: golangci/golangci-lint-action@v6
4243
with:
4344
version: v1.60
4445
only-new-issues: true

0 commit comments

Comments
 (0)