-
Notifications
You must be signed in to change notification settings - Fork 19
34 lines (30 loc) · 930 Bytes
/
check_helm.yml
File metadata and controls
34 lines (30 loc) · 930 Bytes
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
name: Check Helm Chart
on:
pull_request_target:
branches:
- master
jobs:
helm-template:
name: Run helm template
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: hmarr/debug-action@v3.0.0
- name: Checkout
uses: actions/checkout@v6
- name: Run helm template and lint
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
CHANGED_CHARTS=$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}" | grep '^charts/' | cut -d/ -f1-2 | sort -u)
echo "Changed charts:"
echo "$CHANGED_CHARTS"
for chart in $CHANGED_CHARTS; do
echo "Rendering template for $chart"
helm dependency update "$chart"
helm template "$chart"
helm lint "$chart"
done