-
Notifications
You must be signed in to change notification settings - Fork 57
60 lines (49 loc) · 1.81 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
name: 'Lint Charts'
on: 'pull_request'
jobs:
lint:
runs-on: 'ubuntu-20.04'
steps:
- id: 'checkout'
name: Check The Repo Out
uses: 'actions/checkout@v3'
with:
fetch-depth: 0
- name: Get Changed Test Relevant Files
id: 'list-changed-test'
uses: tj-actions/changed-files@v42
with:
files: |
charts/zitadel/templates/**
charts/zitadel/values.yaml
charts/zitadel/Chart.yaml
- id: 'set-up-helm'
name: Install Helm (The Chart Testing CLI Depends On It)
uses: 'azure/setup-helm@v3.5'
with:
version: latest
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'set-up-python'
name: Install Python (The Chart Testing CLI Depends On It)
uses: 'actions/setup-python@v3.1.4'
with:
python-version: 3.11.4
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'set-up-chart-testing'
name: Install Chart Testing CLI
uses: 'helm/chart-testing-action@v2.6.1'
with:
version: 'v3.8.0'
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'list-changed'
name: Check If The Chart Has Changes (not only comments, for example)
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'lint'
name: Lint The Chart
run: 'ct lint --target-branch ${{ github.event.repository.default_branch }}'
if: steps.list-changed-test.outputs.any_changed == 'true' && steps.list-changed.outputs.changed == 'true'