Skip to content

Commit

Permalink
feat(helm): helm linting and testing
Browse files Browse the repository at this point in the history
- new GH workflow for Helm chart linting and testing

Signed-off-by: Hy3n4 <hy3nk4@gmail.com>
  • Loading branch information
Hy3n4 committed Dec 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent ce1b248 commit caea617
Showing 2 changed files with 48 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/lint-test-helm-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Lint and Test Charts

on:
push:
branches:
- helm-chart
# paths:
# - 'helm/**'

jobs:
lint-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Helm
uses: azure/setup-helm@v3

- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true

- name: Run chart-testing (lint)
uses: helm/chart-testing-action@main

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.ref_name }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.ref_name }}

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.8.0

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.ref_name }}
2 changes: 2 additions & 0 deletions .github/workflows/publish-helm-chart.yaml
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ on:
push:
branches:
- helm-chart
paths:
- 'helm/**'

jobs:
release:

0 comments on commit caea617

Please sign in to comment.