dosubot[bot] commented on issue #29521:
URL: https://github.com/apache/superset/issues/29521#issuecomment-2216896123
<!-- Greeting -->
Hello @obsidian-automation! I'm here to assist you with any bugs, questions,
or contributions. Let me know how I can help you today!
<!-- Answer -->
To automate the process of updating the Helm chart app version to match the
release version, you can add a step in your GitHub Actions workflow to update
the `Chart.yaml` file with the new version before running the chart-releaser
action. Here is how you can modify your existing workflow:
```yml
name: Release Charts
on:
push:
branches:
- "master"
- "[0-9].[0-9]*"
paths:
- "helm/**"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.5.4
- name: Add bitnami repo dependency
run: helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Update Chart Version
run: |
VERSION=$(git describe --tags --abbrev=0)
sed -i "s/^version:.*/version: ${VERSION}/" helm/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: ${VERSION}/" helm/Chart.yaml
git add helm/Chart.yaml
git commit -m "Update Helm chart version to ${VERSION}"
git push origin ${{ github.ref }}
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: helm
mark_as_latest: false
env:
CR_TOKEN: "${{ github.token }}"
CR_RELEASE_NAME_TEMPLATE: "superset-helm-chart-{{ .Version }}"
```
This added step (`Update Chart Version`) will:
1. Get the latest tag version from the Git repository.
2. Update both the `version` and `appVersion` fields in the
`helm/Chart.yaml` file to match the latest tag version.
3. Commit and push the changes back to the repository.
This ensures that the Helm chart version and app version are always in sync
with the release version, thus avoiding manual updates and potential bug
reports
<sup>[[1]](https://github.com/apache/superset/blob/master/.github/workflows/superset-helm-release.yml)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/CHANGELOG/4.0.0.md)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]