kubekey/.github/workflows/golangci-lint.yaml
dependabot[bot] 2ad76da661
build(deps): bump golangci/golangci-lint-action from 6 to 8 (#2786)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 8.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v6...v8)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-09 10:24:20 +08:00

82 lines
1.6 KiB
YAML

name: GolangCILint
on:
pull_request:
types: [opened, edited, synchronize, reopened]
paths:
- 'pkg/**'
- 'cmd/**'
- 'version/**'
- 'go.mod'
- 'go.sum'
- 'api/**'
# Remove all permissions from GITHUB_TOKEN except metadata.
permissions: {}
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
if: github.repository == 'kubesphere/kubekey'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: 1.23.3
- name: Sync mod
run: make generate-modules
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v1.63.3
verify:
name: verify
runs-on: ubuntu-latest
if: github.repository == 'kubesphere/kubekey'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: 1.23.3
- name: Sync mod
run: make generate-modules
- name: Verify
run: ALL_VERIFY_CHECKS="goimports releaser" make verify
test:
name: test
runs-on: ubuntu-latest
if: github.repository == 'kubesphere/kubekey'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: 1.23.3
- name: Sync mod
run: make generate-modules
- name: Test
run: make test