Skip to content

feat(helm): helm linting and testing #3

feat(helm): helm linting and testing

feat(helm): helm linting and testing #3

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 }}