Skip to content

Commit 94fce9a

Browse files
ci: Add helm chart checks (#63)
1 parent d958aff commit 94fce9a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/check_helm.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check Helm Chart
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- master
7+
8+
jobs:
9+
helm-template:
10+
name: Run helm template
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pull-requests: read
15+
steps:
16+
- uses: hmarr/[email protected]
17+
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Run helm template and lint
22+
env:
23+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
24+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
25+
run: |
26+
CHANGED_CHARTS=$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}" | grep '^charts/' | cut -d/ -f1-2 | sort -u)
27+
echo "Changed charts:"
28+
echo "$CHANGED_CHARTS"
29+
for chart in $CHANGED_CHARTS; do
30+
echo "Rendering template for $chart"
31+
helm dependency update "$chart"
32+
helm template "$chart"
33+
helm lint "$chart"
34+
done

0 commit comments

Comments
 (0)