mirror of
https://github.com/plcnk/charts.git
synced 2026-04-06 09:40:52 +00:00
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: Lint and Test Charts
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- "charts/**"
|
|
- ".github/workflows/**"
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- "charts/**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.6.1
|
|
|
|
- name: Run chart-testing (lint)
|
|
run: |
|
|
helm repo add bjw-s https://bjw-s.github.io/helm-charts
|
|
ct lint --config .github/ct-lint-config.yaml
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Helm
|
|
uses: azure/setup-helm@v4
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.6.1
|
|
|
|
- name: Run chart-testing (list-changed)
|
|
id: list-changed
|
|
run: |
|
|
changed=$(ct list-changed --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }})
|
|
if [[ -n "$changed" ]]; then
|
|
echo "changed=true" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Create kind cluster
|
|
uses: helm/kind-action@v1.10.0
|
|
|
|
- name: Run chart-testing (install)
|
|
run: ct install --config .github/ct-install-config.yaml
|