Skip to content

chore: bump version to 0.2.18 #70

chore: bump version to 0.2.18

chore: bump version to 0.2.18 #70

Workflow file for this run

name: Publish Helm Chart
on:
push:
branches:
- main
paths:
- 'chart/**'
- '.github/workflows/helm-publish.yml'
workflow_dispatch:
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
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
with:
version: v3.14.0
- name: Package Helm chart
run: |
helm package chart/ --destination .deploy
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Update Helm repository
run: |
# Copy packaged chart to gh-pages
cp .deploy/*.tgz gh-pages/
# Update index
helm repo index gh-pages/ --url https://cased.github.io/cased-cd
# Commit and push
cd gh-pages
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add *.tgz index.yaml
git commit -m "Update Helm chart repository (from $GITHUB_SHA)" || echo "No changes to commit"
git push origin gh-pages
- name: Summary
run: |
echo "### Helm Chart Published :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Chart repository: https://cased.github.io/cased-cd" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "helm repo add cased https://cased.github.io/cased-cd" >> $GITHUB_STEP_SUMMARY
echo "helm repo update" >> $GITHUB_STEP_SUMMARY
echo "helm install cased-cd cased/cased-cd" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY