-
Notifications
You must be signed in to change notification settings - Fork 166
43 lines (38 loc) · 1.17 KB
/
helm-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 Lint
on:
# `ct lint` does not work well with tag references on releases.
# OTOH, Helm linting on tags is not necessary so long as it
# happens on push to branches.
push:
branches:
- '**'
pull_request:
branches-ignore:
- 'release-**/bundle-update'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: |
# is there a better way to get the right name for branch?
# for ref.: https://github.com/helm/chart-testing/issues/186#issuecomment-585595379
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
ct lint --target-branch ${{ github.head_ref }} --config ./charts/ct.yaml
else
ct lint --target-branch ${{ github.ref_name }} --config ./charts/ct.yaml
fi