chore: bump chart version to 0.1.5 (#235) #32
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: Release Chart | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'Chart.yaml' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Install Helm | |
| run: curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
| - name: Get chart version | |
| id: chart | |
| run: | | |
| echo "version=$(grep '^version:' Chart.yaml | awk '{print $2}')" >> $GITHUB_OUTPUT | |
| echo "name=$(grep '^name:' Chart.yaml | awk '{print $2}')" >> $GITHUB_OUTPUT | |
| - name: Check if release exists | |
| id: check | |
| run: | | |
| if gh release view "${{ steps.chart.outputs.name }}-${{ steps.chart.outputs.version }}" &>/dev/null; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update Helm dependencies | |
| if: steps.check.outputs.exists == 'false' | |
| run: helm dependency update | |
| - name: Package chart | |
| if: steps.check.outputs.exists == 'false' | |
| run: helm package . | |
| - name: Create GitHub release | |
| if: steps.check.outputs.exists == 'false' | |
| run: | | |
| gh release create "${{ steps.chart.outputs.name }}-${{ steps.chart.outputs.version }}" \ | |
| --title "${{ steps.chart.outputs.name }}-${{ steps.chart.outputs.version }}" \ | |
| --generate-notes \ | |
| *.tgz | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update Helm repo index | |
| if: steps.check.outputs.exists == 'false' | |
| run: | | |
| mkdir -p gh-pages | |
| cp *.tgz gh-pages/ | |
| cd gh-pages | |
| git init | |
| git checkout -b gh-pages | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
| helm repo index . --url https://github.com/${{ github.repository }}/releases/download/${{ steps.chart.outputs.name }}-${{ steps.chart.outputs.version }} | |
| git add . | |
| git commit -m "Release ${{ steps.chart.outputs.name }}-${{ steps.chart.outputs.version }}" | |
| git push origin gh-pages --force | |
| # Stage a clean chart source directory from the packaged tarball. | |
| # `helm package` applies .helmignore, so extracting the .tgz yields | |
| # _stage/<chart-name>/ without VCS/dev junk. This is what the central | |
| # repo's source tree receives, and it matches the artifact we publish | |
| # to our own gh-pages above. | |
| - name: Stage chart source for central sync | |
| if: steps.check.outputs.exists == 'false' | |
| run: | | |
| mkdir -p _stage | |
| tar -xzf *.tgz -C _stage | |
| # Open a PR in nebari-dev/helm-repository to publish this chart to the | |
| # central catalog (gh-pages index + quay.io OCI). On merge, that repo's | |
| # Release Helm Charts workflow packages, indexes, and publishes it. | |
| # Requires the org secret NEBARI_HELM_REPO_TOKEN to be granted to this | |
| # repository (fine-grained PAT with contents+PR write on helm-repository). | |
| - name: Sync chart to central helm-repository | |
| if: steps.check.outputs.exists == 'false' | |
| uses: nebari-dev/helm-repository/.github/actions/sync-chart@577b5a8b7575bb9a97ee06aaca0fcdade4f177bb # main 2026-06-19 | |
| with: | |
| chart-path: _stage/nebari-data-science-pack | |
| chart-name: nebari-data-science-pack | |
| token: ${{ secrets.NEBARI_HELM_REPO_TOKEN }} | |
| lint-chart: 'false' |