File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 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+ 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
You can’t perform that action at this time.
0 commit comments