Skip to content

feat(session): manage KAP mTLS agent credentials (#1264) #89

feat(session): manage KAP mTLS agent credentials (#1264)

feat(session): manage KAP mTLS agent credentials (#1264) #89

Workflow file for this run

name: Helm chart release
"on":
push:
branches:
- main
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- 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: Publish chart
shell: bash
run: |
set -euo pipefail
chart=deployments/helm/gpud
pages_dir="$RUNNER_TEMP/gh-pages"
name="$(awk '$1 == "name:" { print $2; exit }' "$chart/Chart.yaml")"
version="$(awk '$1 == "version:" { print $2; exit }' "$chart/Chart.yaml")"
package="$pages_dir/$name-$version.tgz"
git fetch origin gh-pages:refs/remotes/origin/gh-pages
git worktree add --detach "$pages_dir" origin/gh-pages
if [[ ! -f "$package" || ! -f "$pages_dir/index.yaml" ]]; then
if [[ ! -f "$package" ]]; then
helm package "$chart" --destination "$pages_dir"
fi
helm repo index "$pages_dir" --url https://leptonai.github.io/gpud
fi
cd "$pages_dir"
git add index.yaml "$name-$version.tgz"
if git diff --cached --quiet; then
exit 0
fi
git commit -m "Publish $name-$version"
git push origin HEAD:gh-pages