helm-chart-console #16
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: helm-chart-console | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| type: string | |
| required: true | |
| description: branch/tag/etc from camel-dashboard-console to release | |
| version: | |
| type: string | |
| required: true | |
| description: version of the release | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Print inputs | |
| run: | | |
| echo "Ref: ${{ inputs.ref }}" | |
| - name: Checkout current repo | |
| uses: actions/checkout@v2 | |
| with: | |
| path: main | |
| - name: Checkout charts repo | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: camel-tooling/camel-dashboard-console | |
| path: camel-dashboard-console | |
| ref: "${{ inputs.ref }}" | |
| - name: Install Helm | |
| uses: azure/[email protected] | |
| - name: Build charts | |
| shell: bash | |
| run: | | |
| cd camel-dashboard-console | |
| mkdir -p docs/charts | |
| make CUSTOM_PLUGIN_VERSION=${{ inputs.version }} helm-release | |
| ls docs/charts | |
| - name: Create branch with helm chart | |
| shell: bash | |
| run: | | |
| cd main | |
| mkdir -p charts/${{ inputs.version }} | |
| cp ../camel-dashboard-console/docs/charts/camel-dashboard-console-${{ inputs.version }}.tgz charts/${{ inputs.version }}/camel-dashboard-console-${{ inputs.version }}.tgz | |
| cd charts | |
| helm repo index ${{ github.workspace }}/main/charts/${{ inputs.version }} --url https://camel-tooling.github.io/camel-dashboard/charts/ --merge ${{ github.workspace }}/main/charts/index.yaml | |
| mv ${{ inputs.version }}/* ${{ inputs.version }}/../. | |
| cd .. | |
| git config --global user.name "${GITHUB_ACTOR}" | |
| git config --global user.email "${{ github.actor_id }}+${GITHUB_ACTOR}@users.noreply.github.com" | |
| git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }} | |
| git checkout -b camel-dashboard-helm-charts-${{ inputs.version }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| git add ./charts/camel-dashboard-console-${{ inputs.version }}.tgz | |
| git add ./charts/index.yaml | |
| git commit -m "chore: Release helm chart camel-dashboard-console ${{ inputs.version }}" | |
| git push origin camel-dashboard-helm-charts-${{ inputs.version }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| git show | |
| git checkout main | |
| - name: Create Pull Request | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| path: main | |
| token: ${{ secrets.PAT }} | |
| commit-message: "chore: Release helm chart camel-dashboard-console ${{ inputs.version }}" | |
| committer: github-actions[bot] <${GITHUB_ACTOR}@users.noreply.github.com> | |
| author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | |
| branch: camel-dashboard-helm-charts-${{ inputs.version }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| signoff: false | |
| draft: false | |
| title: 'chore: Release helm chart camel-dashboard-console ${{ inputs.version }}' | |
| body: | | |
| Helm chart from camel-tooling/camel-dashboard-console repository: | |
| - version ${{ inputs.version }} | |
| - ref ${{ inputs.ref }} | |