Skip to content

Publish Helm Chart main by @liyaka #19

Publish Helm Chart main by @liyaka

Publish Helm Chart main by @liyaka #19

name: Publish Helm Chart
run-name: "Publish Helm Chart ${{ github.ref_name }} by @${{ github.actor }}"
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- "charts/**"
jobs:
publish-helm-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
path: 'src'
fetch-depth: 0
- name: Checkout
uses: actions/[email protected]
with:
path: 'dest'
ref: 'gh-pages'
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.13.0
- name: Run lint on Helm chart
shell: bash
working-directory: src
run: |
set -e
cd charts/public-test
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency build
helm lint --values values.yaml .
cd -
- name: Package helm chart
shell: bash
working-directory: src
run: |
cd charts
helm package --version 1.0.${{ github.run_number }} public-test/ -u -d dest
cd -
- name: Push New Files
shell: bash
working-directory: dest
run: |
helm repo index . --url https://raw.githubusercontent.com/comet-ml/public-test/charts/gh-pages/
git config user.name "Helm Updater"
git config user.email "[email protected]"
git add $(git ls-files -o --exclude-standard)
git add index.yaml
git commit -m "Updated from ref: $GITHUB_SHA"
git push
# - name: Run chart-releaser
# uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
# with:
# charts_dir: charts
# env:
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# - name: Run chart-releaser
# uses: helm/[email protected]
# # with:
# # skip_packaging: true
# # skip_existing: true
# # packages_with_index: true
# env:
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"