mirror of
https://github.com/kubereboot/kured.git
synced 2026-08-28 05:47:23 +00:00
Fix chart linter
Without this patch, the lint action incorrectly returns everything is fine. This is a problem, as lint effectively is not running, and therefore we could merge broken charts. This fixes it by updating to the latest practices you can find in the official chart-repo-actions. (See the official example in ihttps://github.com/helm/charts-repo-actions-demo/blob/1a9640d9983d983404862daee9563fd871db3874/.github/workflows/lint-test.yaml)
This commit is contained in:
@@ -16,12 +16,19 @@ jobs:
|
||||
with:
|
||||
fetch-depth: "0"
|
||||
|
||||
- name: Lint charts
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
command: lint
|
||||
config: .github/ct.yaml
|
||||
python-version: 3.7
|
||||
|
||||
# Helm is already present in github actions, so do not re-install it
|
||||
- name: Setup chart testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
|
||||
- name: Run chart testing
|
||||
run: ct lint --config .github/ct.yaml
|
||||
|
||||
# We create two jobs instead of one to make those parallel.
|
||||
# GH should cancel the rest of the workflow if lint is failing.
|
||||
test-chart:
|
||||
name: Install helm chart
|
||||
runs-on: ubuntu-latest
|
||||
@@ -31,11 +38,16 @@ jobs:
|
||||
with:
|
||||
fetch-depth: "0"
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
# Helm is already present in github actions, so do not re-install it
|
||||
- name: Setup chart testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
|
||||
- name: Create default kind cluster
|
||||
uses: helm/kind-action@v1.1.0
|
||||
|
||||
- name: Install chart with chart-testing-action
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
with:
|
||||
command: install
|
||||
config: .github/ct.yaml
|
||||
- name: Install chart with chart-testing
|
||||
run: ct install
|
||||
|
||||
Reference in New Issue
Block a user