feat(actions): bump helm-chart version when new container image is published (#162)

Signed-off-by: Philipp Born <mail@philipp-born.eu>
This commit is contained in:
Philipp B 2022-06-20 19:25:14 +02:00 committed by GitHub
parent 6b7d2a22df
commit 7446b85bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 2 deletions

View File

@ -16,7 +16,8 @@ on:
permissions:
packages: write
contents: read
contents: write
id-token: write
env:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
@ -104,3 +105,23 @@ jobs:
file: tools/docker/Dockerfile.ubuntu-prod
cache-from: type=registry,ref=${{ github.repository }}:latest
cache-to: type=inline
- name: Configure Git
if: env.IS_PRERELEASE != 'true'
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Update helm chart
if: env.IS_PRERELEASE != 'true'
run: |
sed -Ei \
-e 's/^(version\:) .*/\1 '${{ env.TAG_NAME }}'/g' \
-e 's/^(appVersion\:) .*/\1 "'${{ env.TAG_NAME }}'"/g' \
contrib/charts/dragonfly/Chart.yaml
git commit \
-m 'chore(helm-chart): update to ${{ env.TAG_NAME }}' \
contrib/charts/dragonfly/Chart.yaml
git push