Merge pull request #1712 from dbarzin/dev #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Chart appVersion | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'version.txt' | |
| jobs: | |
| update-chart: | |
| name: Update Chart appVersion | |
| # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions | |
| # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - name: Read version | |
| id: version | |
| run: echo "version=$(cat version.txt)" >> $GITHUB_OUTPUT | |
| - name: Set Chart appVersion | |
| uses: mikefarah/yq@master | |
| env: | |
| CHART_APPVERSION: ${{ steps.version.outputs.version }} | |
| with: | |
| cmd: yq -i '.appVersion = strenv(CHART_APPVERSION)' docs/_helm_chart/chart/Chart.yaml | |
| - name: Commit Chart appVersion | |
| uses: EndBug/add-and-commit@v9 | |
| env: | |
| CHART_APPVERSION: ${{ steps.version.outputs.version }} | |
| with: | |
| default_author: github_actions | |
| message: "chore: bump chart appVersion to ${{ env.CHART_APPVERSION }}" | |
| add: 'docs/_helm_chart/chart/Chart.yaml' | |
| - name: Run chart-releaser | |
| uses: helm/[email protected] | |
| with: | |
| charts_dir: docs/_helm_chart | |
| skip_existing: true | |
| mark_as_latest: false | |
| env: | |
| CR_TOKEN: "${{secrets.GITHUB_TOKEN}}" |