forked from docker-mailserver/docker-mailserver-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (72 loc) · 2.31 KB
/
on-push-lint-charts.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
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
name: Lint and Test Charts
on:
# push:
# paths:
# - 'charts/**'
# - '.github/**'
pull_request:
paths:
- 'charts/**'
- '.github/**'
workflow_dispatch:
env:
KUBE_SCORE_VERSION: 1.12.0
HELM_VERSION: v3.4.1
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: ${{ env.HELM_VERSION }}
- name: Set up kube-score
run: |
mkdir /tmp/bin
wget https://github.com/zegl/kube-score/releases/download/v${{ env.KUBE_SCORE_VERSION }}/kube-score_${{ env.KUBE_SCORE_VERSION }}_linux_amd64 -O /tmp/bin/kube-score
chmod 755 /tmp/bin/kube-score
- name: Kube-score generated manifests
env:
KUBE_SCORE: /tmp/bin/kube-score
run: .ci/scripts/kube-score.sh
chart-testing:
runs-on: ubuntu-latest
strategy:
matrix:
# Choose from https://hub.docker.com/r/kindest/node/tags
KubeVersion: [1.24.15,1.25.11,1.26.6,1.27.3,1.28.0]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# python is a requirement for the chart-testing action below (supports yamllint among other tests)
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .ci/ct-config.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config .ci/ct-config.yaml
- name: Create ${{matrix.KubeVersion}} kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:v${{matrix.KubeVersion}}
cluster_name: kubernetes-${{matrix.KubeVersion}}
if: steps.list-changed.outputs.changed == 'true'
- name: Run chart-testing (install) against ${{matrix.KubeVersion}}
run: ct install --config .ci/ct-config.yaml