Add a Runner that watches for Kubernetes APIs #2264
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linters | |
on: | |
pull_request: | |
env: | |
# Use the Go toolchain installed by setup-go | |
# https://github.com/actions/setup-go/issues/457 | |
GOTOOLCHAIN: local | |
jobs: | |
golangci-lint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
checks: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: { go-version: stable } | |
- uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
args: --timeout=5m | |
# Count issues reported by disabled linters. The command always | |
# exits zero to ensure it does not fail the pull request check. | |
- name: Count non-blocking issues | |
run: | | |
golangci-lint run --config .golangci.next.yaml \ | |
--issues-exit-code 0 \ | |
--max-issues-per-linter 0 \ | |
--max-same-issues 0 \ | |
--out-format json | | |
jq --sort-keys 'reduce .Issues[] as $i ({}; .[$i.FromLinter] += 1)' | | |
awk >> "${GITHUB_STEP_SUMMARY}" ' | |
NR == 1 { print "```json" } { print } END { if (NR > 0) print "```" } | |
' || true |