Skip to content

Commit 100ad21

Browse files
committed
chrore: add linting action
1 parent 65ffb86 commit 100ad21

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/lint-test.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Lint and Test Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
lint-test:
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Helm
21+
uses: azure/[email protected]
22+
with:
23+
version: v3.17.0
24+
25+
- uses: actions/[email protected]
26+
with:
27+
python-version: '3.x'
28+
check-latest: true
29+
30+
- name: Set up chart-testing
31+
uses: helm/[email protected]
32+
33+
- name: Run chart-testing (list-changed)
34+
id: list-changed
35+
run: |
36+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
37+
if [[ -n "$changed" ]]; then
38+
echo "changed=true" >> "$GITHUB_OUTPUT"
39+
fi
40+
41+
- name: Run chart-testing (lint)
42+
if: steps.list-changed.outputs.changed == 'true'
43+
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
44+
45+
# - name: create kind cluster
46+
# if: steps.list-changed.outputs.changed == 'true'
47+
# uses: helm/[email protected]
48+
#
49+
# - name: run chart-testing (install)
50+
# if: steps.list-changed.outputs.changed == 'true'
51+
# run: ct install --target-branch ${{ github.event.repository.default_branch }}

0 commit comments

Comments
 (0)