-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.56 KB
/
ci.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
# ---------------------------------------------------------
# Title: Continuous Integration
#
# Uses:
# - https://github.com/helm/chart-testing-action
# - https://github.com/helm/kind-action
# ---------------------------------------------------------
name: CI
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: "ci"
cancel-in-progress: true
env:
CHARTS_DIRECTORIES_ARG: "--chart-dirs charts"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v3
with:
# note: important to have chart-testing work (see https://github.com/helm/chart-testing/issues/186)
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install chart-testing
uses: helm/chart-testing-action@v2.3.1
- name: List changed charts
id: list-changed
run: |
changed=$(ct list-changed ${CHARTS_DIRECTORIES_ARG} --target-branch ${{ github.event.repository.default_branch }})
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "changed_charts=$charts" >> $GITHUB_OUTPUT
fi
- name: Lint charts
run: ct lint $CHARTS_DIRECTORIES_ARG --target-branch ${{ github.event.repository.default_branch }}