This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.73 KB
/
pr-helm-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This workflow triggers helm linting on PRs and main branch pushes
# that affect helm files
name: Helm Chart Linting on Pull Requests
on:
pull_request:
paths:
- helm/wfl/**
jobs:
lint:
runs-on: ubuntu-latest
container:
image: quay.io/helmpack/chart-testing:v3.0.0-rc.1
steps:
- name: Checkout
uses: actions/checkout@v2
# `ct lint` likes to find charts on its own using git
# history.
- name: Fetch History
run: git fetch --prune --unshallow
# We keep this around because it does version bump and
# maintenance checks outside of what `helm lint` does.
# It is separate because this needs to be at the top of
# the repo, and it is cleaner to use the
# working-directory directive below.
- name: Chart Test Basic Lint
run: ct lint --chart-dirs helm --target-branch main
# These are each actually run by `ct lint`, but we want
# to see their output and set arguments ourselves
# (--strict). Because this GitHub Action is infrequently
# run, duplicating the checks for the sake of keeping
# this Action simple is worth it.
- name: Helm Chart Strict Lint
working-directory: ./helm/wfl
run: |
helm lint --strict --namespace default
yamale --schema /etc/ct/chart_schema.yaml Chart.yaml
yamllint --config-file /etc/ct/lintconf.yaml --strict Chart.yaml values.yaml
# We could theoretically run `ct install` or
# something else here, but there were breadcrumbs
# in previous Helm lint actions that installing
# fails on hyphenated names, so more work would
# need to be done to eliminate hyphens from
# generated names