File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Helm
22
33on :
4+ release :
5+ types : [published]
46 push :
57 branches :
68 - main
79 tags :
810 - " v*"
911 pull_request :
10- workflow_dispatch : {}
12+ workflow_dispatch :
13+ inputs :
14+ version :
15+ description : " Chart version to release (overrides Chart.yaml). Leave empty to use Chart.yaml."
16+ required : false
17+ type : string
1118
1219permissions :
1320 contents : read
7784
7885 release :
7986 needs : lint-and-test
80- if : startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
87+ if : startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' || github.event_name == 'release'
8188 permissions :
8289 contents : read
8390 packages : write
@@ -114,8 +121,14 @@ jobs:
114121
115122 - name : Package chart
116123 id : package_chart
124+ env :
125+ VERSION_INPUT : ${{ inputs.version }}
117126 run : |
118- helm package deploy/charts/reloader --destination .helm-packages
127+ version_arg=()
128+ if [[ -n "${VERSION_INPUT}" ]]; then
129+ version_arg=(--version "${VERSION_INPUT}")
130+ fi
131+ helm package deploy/charts/reloader --destination .helm-packages "${version_arg[@]}"
119132 echo "pkg=$(echo .helm-packages/*.tgz)" >> "$GITHUB_OUTPUT"
120133
121134 - name : Push chart to GHCR
You can’t perform that action at this time.
0 commit comments