Skip to content

Commit 65fa2c3

Browse files
author
Campbell Pool
committed
ci: add helm lint and template validation on PRs
Runs helm lint and helm template for all charts on pull requests that touch files under charts/. Catches template rendering errors before merge. Uses the same Helm version (v3.12.0) and setup action as release.yaml.
1 parent 4b9c3c0 commit 65fa2c3

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'charts/**'
9+
10+
jobs:
11+
lint-and-template:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Helm
18+
uses: azure/setup-helm@v4
19+
with:
20+
version: v3.12.0
21+
22+
- name: Lint charts
23+
run: |
24+
for chart in charts/*/; do
25+
echo "=== Linting ${chart} ==="
26+
helm lint "${chart}"
27+
done
28+
29+
- name: Template charts
30+
run: |
31+
for chart in charts/*/; do
32+
echo "=== Templating ${chart} ==="
33+
helm template test "${chart}"
34+
done

0 commit comments

Comments
 (0)