-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (32 loc) · 1.04 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Validate Helm Charts
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
validate-helm:
name: Validate Helm Charts
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version
- name: Lint and Template Helm Charts
run: |
CHARTS=$(find charts -mindepth 1 -maxdepth 1 -type d -printf "%f\n")
for CHART in "${CHARTS[@]}"; do
if [ -d "charts/$CHART" ]; then
echo "🔍 Checking dependencies for: $CHART"
helm dependency build "charts/$CHART"
echo "✅ Linting Helm Chart: $CHART"
helm lint "charts/$CHART"
echo "📜 Rendering Helm Template: $CHART"
helm template "charts/$CHART" > /dev/null
fi
done