File tree Expand file tree Collapse file tree 4 files changed +44
-3
lines changed Expand file tree Collapse file tree 4 files changed +44
-3
lines changed Original file line number Diff line number Diff line change 42
42
uses : ./
43
43
with :
44
44
version : ' v3.5.1'
45
+ yamllint_version : ' 1.27.1'
46
+ yamale_version : ' 3.0.4'
45
47
- name : Check install!
46
48
run : |
47
49
ct version
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ A GitHub Action for installing the [helm/chart-testing](https://github.com/helm/
16
16
For more information on inputs, see the [ API Documentation] ( https://developer.github.com/v3/repos/releases/#input )
17
17
18
18
- ` version ` : The chart-testing version to install (default: ` v3.7.0 ` )
19
+ - ` yamllint_version ` : The chart-testing version to install (default: ` 1.27.1 ` )
20
+ - ` yamale_version ` : The chart-testing version to install (default: ` 3.0.4 ` )
19
21
20
22
### Example Workflow
21
23
Original file line number Diff line number Diff line change 9
9
description : " The chart-testing version to install (default: v3.7.0)"
10
10
required : false
11
11
default : v3.7.0
12
+ yamllint_version :
13
+ description : " The yamllint version to install (default: 1.27.1)"
14
+ required : false
15
+ default : ' 1.27.1'
16
+ yamale_version :
17
+ description : " The yamale version to install (default: 3.0.4)"
18
+ required : false
19
+ default : ' 3.0.4'
12
20
runs :
13
21
using : composite
14
22
steps :
15
- - run : " $GITHUB_ACTION_PATH/ct.sh --version ${{ inputs.version }}"
23
+ - run : |
24
+ cd $GITHUB_ACTION_PATH \
25
+ && ./ct.sh \
26
+ --version ${{ inputs.version }} \
27
+ --yamllint-version ${{ inputs.yamllint_version }} \
28
+ --yamale-version ${{ inputs.yamale_version }}
16
29
shell: bash
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ set -o nounset
5
5
set -o pipefail
6
6
7
7
DEFAULT_CHART_TESTING_VERSION=v3.7.0
8
+ DEFAULT_YAMLLINT_VERSION=1.27.1
9
+ DEFAULT_YAMALE_VERSION=3.0.4
8
10
9
11
show_help () {
10
12
cat << EOF
17
19
18
20
main () {
19
21
local version=" $DEFAULT_CHART_TESTING_VERSION "
22
+ local yamllint_version=" $DEFAULT_YAMLLINT_VERSION "
23
+ local yamale_version=" $DEFAULT_YAMALE_VERSION "
20
24
21
25
parse_command_line " $@ "
22
26
@@ -40,6 +44,26 @@ parse_command_line() {
40
44
exit 1
41
45
fi
42
46
;;
47
+ --yamllint-version)
48
+ if [[ -n " ${2:- } " ]]; then
49
+ yamllint_version=" $2 "
50
+ shift
51
+ else
52
+ echo " ERROR: '--yamllint-version' cannot be empty." >&2
53
+ show_help
54
+ exit 1
55
+ fi
56
+ ;;
57
+ --yamale-version)
58
+ if [[ -n " ${2:- } " ]]; then
59
+ yamale_version=" $2 "
60
+ shift
61
+ else
62
+ echo " ERROR: '--yamale-version' cannot be empty." >&2
63
+ show_help
64
+ exit 1
65
+ fi
66
+ ;;
43
67
* )
44
68
break
45
69
;;
@@ -76,10 +100,10 @@ install_chart_testing() {
76
100
source " $venv_dir /bin/activate"
77
101
78
102
echo ' Installing yamllint...'
79
- pip3 install yamllint==1.27.1
103
+ pip3 install " yamllint==${yamllint_version} "
80
104
81
105
echo ' Installing Yamale...'
82
- pip3 install yamale==3.0.4
106
+ pip3 install " yamale==${yamale_version} "
83
107
fi
84
108
85
109
# https://github.com/helm/chart-testing-action/issues/62
You can’t perform that action at this time.
0 commit comments