-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (78 loc) · 2.24 KB
/
lint-test.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Lint Charts
on:
pull_request:
branches:
- main
paths:
- 'charts/**'
jobs:
helm-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch helm-docs
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: norwoodj/helm-docs
version: "tags/v1.8.1"
file: "helm-docs_1.8.1_Linux_x86_64.tar.gz"
target: "helm-docs.tar.gz"
- name: Run helm-docs
run: |
tar xzf helm-docs.tar.gz
./helm-docs -s file --template-files=charts/_templates.gotmpl --template-files=DOCS.md.gotmpl --template-files=README.md.gotmpl --chart-search-root=charts
- name: Check helm docs did not change anything
run: |
CHANGES=$(git diff --stat charts)
if [ -n "${CHANGES}" ]; then
printf "README is not up to date with helm-docs. Following mismatches are detected:\n$CHANGES\n"
exit 1
fi
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: ct lint --config .github/ct-lint.yaml
lint-artifacthub:
runs-on: ubuntu-20.04
container:
image: artifacthub/ah
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Lint internal charts
working-directory: ./charts/
run: ah lint
- name: Lint external charts
working-directory: ./external/
run: ah lint
#
# test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Fetch history
# run: git fetch --prune --unshallow
#
# - name: Set up chart-testing
# uses: helm/[email protected]
#
# - name: Create kind cluster
# uses: helm/[email protected]
#
# - name: Run chart-testing (install)
# run: ct install --config .github/ct-install.yaml