Skip to content

Commit d853c28

Browse files
committed
Fix Helm chart version
1 parent bb94a4f commit d853c28

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
echo "::set-output name=sha::${SHA}"
5252
echo "::set-output name=repo::${GITHUB_REPOSITORY#*/}"
5353
echo "::set-output name=branch::${GITHUB_REF##*/}"
54+
echo "::set-output name=helmChartVersion::$(helm show chart ${HELM_CHART_DIR} | grep 'version:' | cut -d ' ' -f 2)"
5455
- name: Build Binary
5556
run: >
5657
make binary
@@ -185,7 +186,7 @@ jobs:
185186
cache-from: type=local,src=/tmp/.buildx-cache
186187
cache-to: type=local,dest=/tmp/.buildx-cache
187188
target: ${{ matrix.target }}
188-
tags: ${{ env.DOCKER_IMAGE }}/${{ needs.binary.outputs.version }}
189+
tags: ${{ env.DOCKER_IMAGE }}:${{ needs.binary.outputs.version }}
189190

190191
smoke-tests:
191192
name: Smoke Tests
@@ -577,12 +578,12 @@ jobs:
577578
- name: Lint
578579
run: helm lint ${{ env.HELM_CHART_DIR }}
579580
- name: Package
580-
run: helm package --version ${{ needs.binary.outputs.version }} ${{ env.HELM_CHART_DIR }}
581+
run: helm package --version ${{ needs.binary.outputs.helmChartVersion }} ${{ env.HELM_CHART_DIR }}
581582
- name: Upload Chart
582583
uses: actions/upload-artifact@v2
583584
with:
584585
name: helm-chart
585-
path: ${{ github.workspace }}/nginx-ingress-${{ needs.binary.outputs.version }}.tgz
586+
path: ${{ github.workspace }}/nginx-ingress-${{ needs.binary.outputs.helmChartVersion }}.tgz
586587

587588
release-helm:
588589
name: Release Helm Chart
@@ -597,7 +598,7 @@ jobs:
597598
fetch-depth: 1
598599
token: ${{ secrets.NGINX_PAT }}
599600
- name: Remove previous Chart
600-
run: rm -f ${{ github.workspace }}/stable/nginx-ingress-${{ needs.binary.outputs.version }}.tgz
601+
run: rm -f ${{ github.workspace }}/stable/nginx-ingress-${{ needs.binary.outputs.helmChartVersion }}.tgz
601602
- name: Retrieve latest Helm Chart
602603
uses: actions/download-artifact@v2
603604
with:

0 commit comments

Comments
 (0)