.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>
This commit is contained in:
Mario Minardi 2025-11-27 15:31:50 -07:00 committed by Mario Minardi
parent b40272e767
commit 411cee0dc9

View File

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