File tree Expand file tree Collapse file tree 1 file changed +28
-10
lines changed Expand file tree Collapse file tree 1 file changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ name: Release Helm
2
2
3
3
on :
4
4
push :
5
- tags :
6
- - ' */v*'
5
+ branches :
6
+ - ' releases/ */v*'
7
7
8
8
jobs :
9
9
release :
19
19
with :
20
20
version : v3.10.0
21
21
22
+ - name : Install yq
23
+ uses : mikefarah/yq@v4.44.6
24
+
22
25
- name : Login to mrmhub
23
26
run : |
24
27
echo '${{ secrets.MRMHUB_PASSWORD }}' | helm registry login mrmhub.io --username '${{ secrets.MRMHUB_USERNAME }}' --password-stdin
@@ -27,14 +30,29 @@ jobs:
27
30
id : chart_meta
28
31
run : |
29
32
cat >> "$GITHUB_OUTPUT" <<EOF
30
- chart_name=$(cut -d / -f 3 <<<"${{ github.ref }}")
31
- chart_version=$(cut -d / -f 4 - <<<"${{ github.ref }}")
33
+ chart_name=$(cut -d / -f 4 <<<"${{ github.ref }}")
34
+ chart_version=$(cut -d / -f 5 - <<<"${{ github.ref }}")
32
35
EOF
33
36
34
- - name : Package chart
35
- run : |
36
- helm package "${{ steps.chart_meta.outputs.chart_name }}" --version "${{ steps.chart_meta.outputs.chart_version }}"
37
-
38
- - name : Upload chart
37
+ - name : Update chart version
39
38
run : |
40
- helm push "${{ steps.chart_meta.outputs.chart_name }}-${{ steps.chart_meta.outputs.chart_version }}.tgz" oci://mrmhub.io/mikemrm
39
+ chart_file="${{ steps.chart_meta.outputs.chart_name }}/Chart.yaml"
40
+
41
+ yq '.version = "${{ steps.chart_meta.outputs.chart_version }}"' \
42
+ "${chart_file}" > "${chart_file}.updated"
43
+
44
+ if diff -q "${chart_file}" "${chart_file}.updated"; then
45
+ mv -f "${chart_file}.update" "${chart_file}"
46
+ fi
47
+
48
+ make helm-docs
49
+
50
+ make diff
51
+
52
+ # - name: Package chart
53
+ # run: |
54
+ # helm package "${{ steps.chart_meta.outputs.chart_name }}" --version "${{ steps.chart_meta.outputs.chart_version }}"
55
+
56
+ # - name: Upload chart
57
+ # run: |
58
+ # helm push "${{ steps.chart_meta.outputs.chart_name }}-${{ steps.chart_meta.outputs.chart_version }}.tgz" oci://mrmhub.io/mikemrm
You can’t perform that action at this time.
0 commit comments