Skip to content

fix: update exporter version #76

fix: update exporter version

fix: update exporter version #76

name: Publish Charts on tagging
on:
push:
tags: 'v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
env:
TAG: ${{ github.ref_name }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: gh-pages
path: gh-pages
persist-credentials: true
- name: Publish Helm charts
run: |
CHARTS_TMP_DIR=$(mktemp -d)
helm lint charts/core charts/crd charts/monitor
helm package charts/core charts/crd charts/monitor --destination ${CHARTS_TMP_DIR} --version ${TAG#v}
cd gh-pages/
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
if [[ -f "index.yaml" ]]; then
FLAGS="--merge index.yaml"
fi
helm repo index ${CHARTS_TMP_DIR} --url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} ${FLAGS}
mv -f ${CHARTS_TMP_DIR}/*.tgz ./
mv -f ${CHARTS_TMP_DIR}/index.yaml ./index.yaml
git add .
git commit -m "Publish ${{ github.ref_name }}"
git push origin gh-pages