Update chart-release.yaml #10
Workflow file for this run
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 Charts | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| # paths: | |
| # - 'charts/**' | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| 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 | |
| uses: azure/setup-helm@v4 | |
| - name: Add dependency chart repos | |
| run: | | |
| helm repo add bitnami https://charts.bitnami.com/bitnami | |
| - name: Package charts | |
| run: | | |
| mkdir -p helm-packages | |
| for DIR in charts/*; do | |
| if [ -f "${DIR}/Chart.yaml" ]; then | |
| echo "Packaging ${DIR}" | |
| helm dependency update "${DIR}" | |
| helm package "${DIR}" -d helm-packages | |
| fi | |
| done | |
| git fetch --all | |
| - name: Upload charts | |
| run: | | |
| git checkout gh-pages --force | |
| helm repo index helm-packages/ --merge index.yaml | |
| cp helm-packages/* . | |
| rm -rf helm-packages | |
| echo "New index.yaml: " && cat index.yaml | |
| git add --all | |
| git commit -m "Update Helm charts index" | |
| git push origin gh-pages |