Skip to content

Commit

Permalink
Merge branch 'feature/config-secret' of https://github.com/bakdata/rc…
Browse files Browse the repository at this point in the history
…lone-helm-chart into feature/config-secret
  • Loading branch information
philipp94831 committed Jul 8, 2024
2 parents 6df7e59 + 9d3ce5d commit de48e70
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/helm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up bump2version
run: |
pipx install bump2version
shell: bash

- name: Get current version from bumpversion
id: get-version
run: |
version=$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)
if ! [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then
version="${version}-SNAPSHOT"
if [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then
version="$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)"
else
bump2version --allow-dirty --no-tag --no-commit patch
version="$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)-SNAPSHOT"
fi
echo "version=$version" >> $GITHUB_OUTPUT
shell: bash

call-workflow-passing-data:
publish:
name: Publish Helm chart
uses: bakdata/ci-templates/.github/workflows/[email protected]
needs: get-version
Expand Down

0 comments on commit de48e70

Please sign in to comment.