diff --git a/.github/workflows/helm-publish.yml b/.github/workflows/helm-publish.yml index 15596fe3b..b8343fe45 100644 --- a/.github/workflows/helm-publish.yml +++ b/.github/workflows/helm-publish.yml @@ -4,6 +4,14 @@ on: release: types: - published + workflow_call: + inputs: + tag_name: + required: true + type: string + secrets: + HELM_PUBLISH_TOKEN: + required: true jobs: publish: @@ -11,6 +19,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 + with: + ref: ${{ inputs.tag_name || github.event.release.tag_name }} - name: Install Helm uses: azure/setup-helm@v4 @@ -20,7 +30,7 @@ jobs: - name: Update and package all charts run: | - TAG="${{ github.event.release.tag_name }}" + TAG="${{ inputs.tag_name || github.event.release.tag_name }}" VERSION="${TAG#v}" APP_VERSION="$TAG" mkdir -p /tmp/helm-package @@ -43,7 +53,7 @@ jobs: cp /tmp/helm-package/*.tgz charts-branch/ cd charts-branch helm repo index . \ - --url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} + --url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name || 'testnet' }} - name: Commit and push to charts branch run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 360d7f8d1..46a165a8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,6 +118,16 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + helm-publish: + name: Publish Helm charts + needs: release + if: needs.release.outputs.new_release_published == 'true' + uses: ./.github/workflows/helm-publish.yml + with: + tag_name: v${{ needs.release.outputs.new_release_version }} + secrets: + HELM_PUBLISH_TOKEN: ${{ secrets.HELM_PUBLISH_TOKEN }} + publish: name: Publish Docker images runs-on: ubuntu-latest