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 4242 uses : ./
4343 with :
4444 version : ' v3.5.1'
45+ yamllint_version : ' 1.27.1'
46+ yamale_version : ' 3.0.4'
4547 - name : Check install!
4648 run : |
4749 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/
1616For more information on inputs, see the [ API Documentation] ( https://developer.github.com/v3/repos/releases/#input )
1717
1818- ` 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 ` )
1921
2022### Example Workflow
2123
Original file line number Diff line number Diff line change 99 description : " The chart-testing version to install (default: v3.7.0)"
1010 required : false
1111 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'
1220runs :
1321 using : composite
1422 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 }}
1629 shell: bash
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ set -o nounset
55set -o pipefail
66
77DEFAULT_CHART_TESTING_VERSION=v3.7.0
8+ DEFAULT_YAMLLINT_VERSION=1.27.1
9+ DEFAULT_YAMALE_VERSION=3.0.4
810
911show_help () {
1012cat << EOF
1719
1820main () {
1921 local version=" $DEFAULT_CHART_TESTING_VERSION "
22+ local yamllint_version=" $DEFAULT_YAMLLINT_VERSION "
23+ local yamale_version=" $DEFAULT_YAMALE_VERSION "
2024
2125 parse_command_line " $@ "
2226
@@ -40,6 +44,26 @@ parse_command_line() {
4044 exit 1
4145 fi
4246 ;;
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+ ;;
4367 * )
4468 break
4569 ;;
@@ -76,10 +100,10 @@ install_chart_testing() {
76100 source " $venv_dir /bin/activate"
77101
78102 echo ' Installing yamllint...'
79- pip3 install yamllint==1.27.1
103+ pip3 install " yamllint==${yamllint_version} "
80104
81105 echo ' Installing Yamale...'
82- pip3 install yamale==3.0.4
106+ pip3 install " yamale==${yamale_version} "
83107 fi
84108
85109 # https://github.com/helm/chart-testing-action/issues/62
You can’t perform that action at this time.
0 commit comments