Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 59 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ permissions:
pull-requests: read

jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-24.04
changes:
name: detect changes
runs-on: ubuntu-latest
outputs:
lint: ${{ steps.filter.outputs.lint }}
gofmt: ${{ steps.filter.outputs.gofmt }}
helm: ${{ steps.filter.outputs.helm }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Filter paths
id: changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
Expand All @@ -30,13 +31,62 @@ jobs:
- 'go.sum'
- '.golangci.yml'
- '.github/workflows/lint.yml'
gofmt:
- '**/*.go'
- 'Makefile'
- '.github/workflows/lint.yml'
helm:
- 'manifests/charts/base/**'
- 'Makefile'
- '.github/workflows/lint.yml'

golangci:
name: golangci-lint
needs: changes
if: needs.changes.outputs.lint == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
if: steps.changes.outputs.lint == 'true'
uses: actions/setup-go@v5
with:
go-version: "1.24"

- name: Run golangci-lint
if: steps.changes.outputs.lint == 'true'
run: make lint

gofmt:
name: gofmt
needs: changes
if: needs.changes.outputs.gofmt == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"

- name: Check Go formatting
run: make fmt-check

helm:
name: helm-lint
needs: changes
if: needs.changes.outputs.helm == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Helm
uses: azure/setup-helm@v4
Comment on lines +86 to +87
with:
version: v3.17.3

- name: Check Helm chart
run: make helm-check
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ helm-template: ## Render Helm chart locally
helm-lint: ## Lint Helm chart
helm lint manifests/charts/base

.PHONY: helm-check
helm-check: ## Lint Helm chart and verify templates render
$(MAKE) helm-lint
$(MAKE) helm-template >/dev/null


##@ Dependencies

Expand Down
Loading