File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Lint and Test Charts
2+
3+ on : [pull_request,push]
4+
5+ jobs :
6+ lint-test :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Checkout
10+ uses : actions/checkout@v4
11+ with :
12+ fetch-depth : 0
13+
14+ - name : Set up Helm
15+ uses : azure/setup-helm@v4
16+
17+ - uses : actions/setup-python@v5
18+ with :
19+ python-version : ' 3.9'
20+ check-latest : true
21+
22+ - name : Set up chart-testing
23+ 24+
25+ - name : Run chart-testing (list-changed)
26+ id : list-changed
27+ run : |
28+ changed_files=$(ct list-changed --config ct.yaml --target-branch ${{ github.event.repository.default_branch }} 2>/dev/null | wc -l | tr -d ' ')
29+ echo "Changed files detected: $changed_files"
30+ if [ $changed_files -ne 0 ]; then
31+ echo "changed=true" >> $GITHUB_OUTPUT
32+ else
33+ echo "changed=false" >> $GITHUB_OUTPUT
34+ fi
35+
36+ - name : Run chart-testing (lint)
37+ if : steps.list-changed.outputs.changed == 'true'
38+ run : ct lint --config ct.yaml --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false
39+
40+ - name : Create kind cluster
41+ if : steps.list-changed.outputs.changed == 'true'
42+ 43+
44+ - name : Run chart-testing (install)
45+ if : steps.list-changed.outputs.changed == 'true'
46+ run : ct install --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}
Original file line number Diff line number Diff line change 1+ chart-dirs :
2+ - ./
You can’t perform that action at this time.
0 commit comments