From 82f29c0a2a362cb468d996862bff997ce29f2334 Mon Sep 17 00:00:00 2001 From: Alastair Pitts Date: Thu, 7 Dec 2023 15:54:34 +1100 Subject: [PATCH] Fix version number --- .../workflows/kubernetes-tentacle-publish-chart.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kubernetes-tentacle-publish-chart.yaml b/.github/workflows/kubernetes-tentacle-publish-chart.yaml index 268e89d2..922f147f 100644 --- a/.github/workflows/kubernetes-tentacle-publish-chart.yaml +++ b/.github/workflows/kubernetes-tentacle-publish-chart.yaml @@ -24,18 +24,23 @@ jobs: - name: Get branch names id: branch_names uses: OctopusDeploy/util-actions/current-branch-name@current-branch-name.0.1.0 + + - id: version + run: | + DATE=$(date '+%Y%m%d%H%M%S') + echo "CHART_VERSION=${{ steps.read_chart_yaml.outputs.version }}-${{ steps.branch_names.outputs.branch_name }}-$DATE" >> $GITHUB_ENV #- name: Login to Artifactory # run: helm registry login packages.octopushq.com -u '${{ }}' -p '${{}}' - name: Package Chart - run: helm package './charts/kubernetes-tentacle' --version '${{ steps.read_chart_yaml.outputs["version"] }}-${{ steps.branch_names.outputs.branch_name }}' + run: helm package './charts/kubernetes-tentacle' --version '$CHART_VERSION' - uses: actions/upload-artifact@v3 name: Upload packaged chart with: - name: 'kubernetes-tentacle-${{ steps.read_chart_yaml.outputs["version"] }}-${{ steps.branch_names.outputs.branch_name }}.tgz' - path: '${{ github.workspace }}/kubernetes-tentacle-${{ steps.read_chart_yaml.outputs["version"] }}-${{ steps.branch_names.outputs.branch_name }}.tgz' + name: 'kubernetes-tentacle-$CHART_VERSION.tgz' + path: '${{ github.workspace }}/kubernetes-tentacle-$CHART_VERSION.tgz' #- name: Push Chart to Artifactory # run: helm push 'kubernetes-tentacle' oci://packages.octopushq.com