@@ -96,51 +96,52 @@ jobs:
9696 runs-on : ubuntu-latest
9797 needs : [semantic-release, docker]
9898 if : ${{ needs.semantic-release.outputs.new-release-published == 'true' }}
99+ outputs :
100+ release-version : ${{ needs.semantic-release.outputs.release-version }}
99101 steps :
100102 - name : Harden Runner
101103 uses : step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.3
102104 with :
103105 egress-policy : audit
104106
105107 - uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
106- - name : Download yq
107- run : |
108- wget -nv -nc -O yq https://github.com/mikefarah/yq/releases/download/v4.20.2/yq_linux_amd64
109- chmod +x yq
110108 - name : Update chart version
111- run : ./yq -i e '.version = "${{ needs.semantic-release.outputs.release-version }}"' chart/Chart.yaml
109+ uses : mikefarah/yq@7ccaf8e700ce99eb3f0f6cef7f5930a0b3c827cd # v4.49.2
110+ with :
111+ cmd : yq -i '.version = "${{ needs.semantic-release.outputs.release-version }}"' chart/Chart.yaml
112112 - name : Update app version
113- run : ./yq -i e '.appVersion = "${{ needs.semantic-release.outputs.release-version }}"' chart/Chart.yaml
113+ uses : mikefarah/yq@7ccaf8e700ce99eb3f0f6cef7f5930a0b3c827cd # v4.49.2
114+ with :
115+ cmd : yq -i '.appVersion = "${{ needs.semantic-release.outputs.release-version }}"' chart/Chart.yaml
114116 - name : Update image tags
115- run : ./yq -i e '.image.tag = "v${{ needs.semantic-release.outputs.release-version }}"' chart/values.yaml
116- - name : Set up Helm
117- uses : azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1
117+ uses : mikefarah/yq@7ccaf8e700ce99eb3f0f6cef7f5930a0b3c827cd # v4.49.2
118118 with :
119- version : v3.8.0
119+ cmd : yq -i '.image.tag = "v${{ needs.semantic-release.outputs.release-version }}"' chart/values.yaml
120+ - name : Set up Helm
121+ uses : azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
120122 - name : Package Helm chart
121123 run : |
122124 helm package ./chart
123- - name : Clone charts repo
124- uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
125- with :
126- repository : " ${{ github.repository_owner }}/charts"
127- path : charts
128- token : " ${{ secrets.FLANKBOT }}"
129- - name : Update chart repo
130- run : |
131- cd charts
132- cp ../flanksource-ui-*.tgz ./
133- helm repo index --merge index.yaml .
134- - name : Push changes to chart repo
135- uses : stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
136- with :
137- commit_message : " Release ${{ needs.semantic-release.outputs.release-version }} of ${{ github.repository }}"
138- branch : gh-pages
139- repository : ./charts
125+ - name : Upload helm chart artifact
126+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
127+ with :
128+ name : helm-chart
129+ path : flanksource-ui-*.tgz
130+
131+ push-helm-chart :
132+ needs : helm
133+ if : always() && needs.helm.result == 'success'
134+ uses : flanksource/action-workflows/.github/workflows/push-helm-chart.yml@4b41aaf6cf7727789c0d21cd0bc262e850ba543f # main
135+ with :
136+ filename_regex : " flanksource-ui-*.tgz"
137+ version : ${{ needs.helm.outputs.release-version }}
138+ pr_title : " Release ${{ needs.helm.outputs.release-version }} of ${{ github.repository }}"
139+ secrets :
140+ token : ${{ secrets.FLANKBOT }}
140141
141142 update-canary-checker :
142143 runs-on : ubuntu-latest
143- needs : [docker, helm, semantic-release]
144+ needs : [docker, push- helm-chart , semantic-release]
144145 if : ${{ needs.semantic-release.outputs.new-release-published == 'true' }}
145146 steps :
146147 - name : Harden Runner
@@ -175,7 +176,7 @@ jobs:
175176
176177 update-incident-commander :
177178 runs-on : ubuntu-latest
178- needs : [docker, helm, semantic-release]
179+ needs : [docker, push- helm-chart , semantic-release]
179180 if : ${{ needs.semantic-release.outputs.new-release-published == 'true' }}
180181 steps :
181182 - name : Harden Runner
0 commit comments