@@ -41,10 +41,28 @@ inputs:
4141 See <https://github.com/docker/login-action#usage>.
4242 default : ${{ github.token }}
4343 required : false
44+ enable-lint :
45+ description : |
46+ Enable linting of the Helm chart.
47+ See <https://github.com/helm/chart-testing/blob/main/doc/ct_lint.md>.
48+ required : false
49+ default : " true"
50+ enable-test :
51+ description : |
52+ Enable testing of the Helm chart.
53+ See <https://github.com/helm/chart-testing/blob/main/doc/ct_install.md>.
54+ required : false
55+ default : " true"
4456
4557runs :
4658 using : " composite"
4759 steps :
60+ - shell : bash
61+ if : ${{ inputs.enable-lint != 'true' && inputs.enable-test != 'true' }}
62+ run : |
63+ echo "::error ::At least one of 'enable-lint' or 'enable-test' input must be true"
64+ exit 1
65+
4866 -
uses :
hoverkraft-tech/ci-github-common/actions/[email protected] 4967 with :
5068 fetch-depth : 0
6179 fi
6280
6381 - name : Install tools with asdf
64- if : steps.check-tools-version.outputs.tools-version-exists == 'true'
82+ if : ${{ steps.check-tools-version.outputs.tools-version-exists == 'true' }}
6583 uses : asdf-vm/actions/install@v3
6684
6785 - name : Check for ct.yaml file
93111 done
94112
95113 - name : Run chart-testing (lint)
114+ if : ${{ inputs.enable-lint == 'true' }}
96115 shell : bash
97116 working-directory : ${{ inputs.working-directory }}
98117 run : |
@@ -104,9 +123,11 @@ runs:
104123 ct lint $LINT_ARGS
105124
106125 - name : Create kind cluster
126+ if : ${{ inputs.enable-test == 'true' }}
107127108128
109- - name : install default registry secrets
129+ - name : Install default registry secrets
130+ if : ${{ inputs.enable-test == 'true' }}
110131 shell : bash
111132 run : |
112133 echo "DOCKER_REGISTRY=$DOCKER_REGISTRY"
@@ -126,6 +147,7 @@ runs:
126147 DOCKER_PASSWORD : ${{ inputs.oci-registry-password }}
127148
128149 - name : Define target branch
150+ if : ${{ inputs.enable-test == 'true' }}
129151 id : define-target-branch
130152 shell : bash
131153 run : |
@@ -137,6 +159,7 @@ runs:
137159 echo "target-branch=$TARGET_BRANCH" >> "$GITHUB_OUTPUT"
138160
139161 - name : Run chart-testing (install)
162+ if : ${{ inputs.enable-test == 'true' }}
140163 shell : bash
141164 working-directory : ${{ inputs.working-directory }}
142165 env :
0 commit comments