-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.29 KB
/
helm-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish Helm Charts
on:
push:
jobs:
get-version:
name: Get version from bumpversion
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
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: |
if ! [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then
bump2version --allow-dirty --no-tag --no-commit patch
version="$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)-SNAPSHOT"
else
version="$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)"
fi
echo "version=$version" >> $GITHUB_OUTPUT
shell: bash
publish:
name: Publish Helm chart
uses: bakdata/ci-templates/.github/workflows/[email protected]
needs: get-version
with:
charts-path: "./charts"
subdirs: "['rclone-copy']"
gh-pages-branch: gh-pages
version: ${{ needs.get-version.outputs.version }}
secrets:
github-username: ${{ secrets.GH_USERNAME }}
github-email: ${{ secrets.GH_EMAIL }}
github-token: ${{ secrets.GH_TOKEN }}