-
Notifications
You must be signed in to change notification settings - Fork 175
47 lines (37 loc) · 1.21 KB
/
pull-request.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
name: CI-pullrequest
on:
pull_request:
branches:
- dev-v*
- release-v*
jobs:
validate-chart-questions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Validate all charts have a questions file
run: >
failed=false
chart_dirs=$(find charts -type d -mindepth 2 -maxdepth 2)
for chart in $chart_dirs; do
if [[ ! -f $chart/questions.yaml ]] && [[ ! -f $chart/questions.yml ]]; then
echo "$chart is missing a questions file"
failed=true
fi
done
if [[ $failed == true ]]; then
exit 1
fi
- name: Validate all questions files have a `rancher_min_version` defined
run: >
failed=false
questions_files=$(find charts -type f -name questions.y\*ml)
questions_without_min=$(grep -rL "rancher_min_version" $questions_files) || true
for questions in $questions_without_min; do
echo "$questions does not have a rancher_min_version constraint defined"
failed=true
done
if [[ $failed == true ]]; then
exit 1
fi