Skip to content

Commit 5833a7f

Browse files
feat: publish helm chart on main push with 0.0.0-latest version
1 parent 838f429 commit 5833a7f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/helm-publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Package and Push Helm Chart
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
branches: [main]
6+
tags: ['v*']
77

88
jobs:
99
helm-publish:
@@ -32,10 +32,14 @@ jobs:
3232
run: |
3333
helm dependency update manifests/
3434
35-
- name: Get version from tag
35+
- name: Get version
3636
id: version
3737
run: |
38-
VERSION=${GITHUB_REF#refs/tags/v}
38+
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
39+
VERSION=${GITHUB_REF#refs/tags/v}
40+
else
41+
VERSION="0.0.0-latest"
42+
fi
3943
echo "version=$VERSION" >> $GITHUB_OUTPUT
4044
4145
- name: Update chart version

0 commit comments

Comments
 (0)