Skip to content

Commit b4377b6

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 b4377b6

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
strategy:
13+
matrix:
14+
ip-family: [ "ipv4" ]
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5.0.0
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Helm
22+
uses: azure/setup-helm@v4.3.1
23+
24+
- uses: actions/setup-python@v6.0.0
25+
with:
26+
python-version: '3.x'
27+
check-latest: true
28+
29+
- name: Set up chart-testing
30+
uses: helm/chart-testing-action@v2.8.0
31+
32+
- name: Run chart-testing (list-changed)
33+
id: list-changed
34+
run: |
35+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
36+
if [[ -n "$changed" ]]; then
37+
echo "changed=true" >> "$GITHUB_OUTPUT"
38+
fi
39+
40+
- name: Run chart-testing (lint)
41+
if: steps.list-changed.outputs.changed == 'true'
42+
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
43+
44+
- name: Install kind
45+
uses: helm/kind-action@v1.13.0
46+
with:
47+
version: ${{ env.KIND_VERSION }}
48+
install_only: true
49+
50+
- name: Create kind cluster
51+
run: |
52+
sudo pip3 install jinjanator j2cli
53+
sudo PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }}
54+
sudo cp -r /root/.kube/ ~/.kube/
55+
sudo chown -R $(id -un). ~/.kube/
56+
57+
- name: Run chart-testing (install)
58+
if: steps.list-changed.outputs.changed == 'true'
59+
run: |
60+
kubectl label node --overwrite -l node-role.kubernetes.io/control-plane kube-ovn/role=master
61+
ct install --target-branch ${{ github.event.repository.default_branch }}

charts/kube-ovn-v2/Chart.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: v2
22
name: kube-ovn-v2
33
description: Helm chart for Kube-OVN
44
type: application
5-
version: v1.16.0
5+
version: v1.16.1
66
appVersion: "1.16.0"
77
kubeVersion: ">= 1.29.0-0"
8+
maintainers:
9+
- name: oujonny

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)