-
Notifications
You must be signed in to change notification settings - Fork 44
43 lines (43 loc) · 1.36 KB
/
helm-chart-lint.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
name: Helm Chart Linting
on:
pull_request:
paths:
- 'charts/**'
jobs:
helm-lint_and_helm-template:
runs-on: ubuntu-latest
outputs:
charts: ${{ steps.filter.outputs.charts }}
values: ${{ steps.values.outputs.values }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
list-files: shell
filters: |
charts:
- added|modified: 'charts/**/templates/**'
- run: echo ${{ steps.filter.outputs.charts }}
- uses: actions/setup-python@v2
- uses: jannekem/run-python-script-action@v1
id: python
with:
script: |
string='${{ steps.filter.outputs.charts_files }}'
location=string.split("templates",1)[0]
print(location)
set_output("chart_path",location)
- run: echo ${{ steps.python.outputs.chart_path }}
- name: Print errors
if: steps.script.outputs.error == 'true'
run: |
printenv "SCRIPT_STDOUT"
printenv "SCRIPT_STDERR"
- name: Adding dependency
run: cd ./${{ steps.python.outputs.chart_path }} && helm dependency build
- name: helm-check
uses: igabaydulin/[email protected]
env:
CHART_LOCATION: ./${{ steps.python.outputs.chart_path }}
CHART_VALUES: ./${{ steps.python.outputs.chart_path }}values.yaml