Skip to content

Commit

Permalink
Ops 6635 image version chart release option (#25)
Browse files Browse the repository at this point in the history
* adapted chart-release.yaml with omit option

* Update chart-release.yaml typo

* Update chart-release.yaml

* Update chart-release.yaml env.image tag {{ removed

* Update chart-release.yaml
  • Loading branch information
MWesterholz authored Aug 7, 2024
1 parent 69e2f89 commit 73dddb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
required: false
default: ""
image_tag_generation:
description: "Generation of the image tag: ticket_from_branch(default), commit_hash or version_git_tag, specified"
description: "Generation of the image tag: ticket_from_branch(default), commit_hash or version_git_tag, specified, chart_yaml"
required: false
type: string
default: "ticket_from_branch"
Expand Down Expand Up @@ -128,6 +128,8 @@ jobs:
image_tag="sha-$(echo ${GITHUB_SHA} | cut -c1-7)"
elif [[ "${{ inputs.image_tag_generation }}" == 'specified' ]]; then
image_tag="${{ inputs.image_tag }}"
elif [[ "${{ inputs.image_tag_generation }}" == 'chart_yaml' ]]; then
echo "image_tag specification ommited, helm uses value from chart.yaml"
fi
echo "image_tag=$image_tag" >> $GITHUB_ENV
Expand All @@ -136,7 +138,7 @@ jobs:

- name: Prepare Helm Chart
run: |
helm package ${{ inputs.chart_path }}/${{ inputs.chart_name }} -d helm-charts-registry --app-version ${{ env.image_tag }} ${{ inputs.helm_chart_version_generation != 'chart_yaml' && '--version $chart_version' || '' }}
helm package ${{ inputs.chart_path }}/${{ inputs.chart_name }} -d helm-charts-registry ${{ inputs.image_tag_generation != 'chart_yaml' && '--app-version $image_tag' || '' }} ${{ inputs.helm_chart_version_generation != 'chart_yaml' && '--version $chart_version' || '' }}
cd helm-charts-registry
if [ -d "automation/${{ inputs.chart_name }}" ]; then rm -r automation/${{ inputs.chart_name }}; fi
tar -xzf ${{ inputs.chart_name }}*.tgz
Expand Down

0 comments on commit 73dddb6

Please sign in to comment.