.github/workflows: only run golang ci lint when go files have changed

Restrict running the golangci-lint workflow to when the workflow file
itself or a .go file, go.mod, or go.sum have actually been modified.

Updates #cleanup

Signed-off-by: Mario Minardi <mario@tailscale.com>
pull/16861/merge
Mario Minardi 6 days ago committed by Mario Minardi
parent b40272e767
commit 411cee0dc9

@ -2,7 +2,11 @@ name: golangci-lint
on:
# For now, only lint pull requests, not the main branches.
pull_request:
paths:
- ".github/workflows/golangci-lint.yml"
- "**.go"
- "go.mod"
- "go.sum"
# TODO(andrew): enable for main branch after an initial waiting period.
#push:
# branches:

Loading…
Cancel
Save