Skip to content

Commit 63d8072

Browse files
committed
feat: add GitHub Actions workflow for linting and testing Helm charts
Signed-off-by: oujonny <jonny@immerda.ch>
1 parent a52abe2 commit 63d8072

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Lint and Test Charts
2+
3+
on: pull_request
4+
5+
permissions: {}
6+
7+
jobs:
8+
lint-test:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v5.0.0
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Helm
19+
uses: azure/setup-helm@v4.3.1
20+
21+
- uses: actions/setup-python@v6.0.0
22+
with:
23+
python-version: '3.x'
24+
check-latest: true
25+
26+
- name: Set up chart-testing
27+
uses: helm/chart-testing-action@v2.8.0
28+
29+
- name: Run chart-testing (list-changed)
30+
id: list-changed
31+
run: |
32+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
33+
if [[ -n "$changed" ]]; then
34+
echo "changed=true" >> "$GITHUB_OUTPUT"
35+
fi
36+
37+
- name: Run chart-testing (lint)
38+
if: steps.list-changed.outputs.changed == 'true'
39+
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
40+
41+
- name: Create kind cluster
42+
if: steps.list-changed.outputs.changed == 'true'
43+
uses: helm/kind-action@v1.12.0
44+
45+
- name: Run chart-testing (install)
46+
if: steps.list-changed.outputs.changed == 'true'
47+
run: ct install --target-branch ${{ github.event.repository.default_branch }}

charts/kube-ovn-v2/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,3 +931,6 @@ extraObjects: []
931931
# }
932932
# ]
933933
# }
934+
935+
# TODO: remove only temorary
936+
trigger: true

0 commit comments

Comments
 (0)