Added GH workflow to create and publish Helm chart to GH Pages as hel… #1
This file contains 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: | |
workflow_dispatch: { } | |
push: | |
branches: | |
- "main" | |
permissions: {} | |
# see https://github.com/helm/chart-releaser-action | |
jobs: | |
release: | |
permissions: | |
contents: write # to push chart release and create a release (helm/chart-releaser-action) | |
packages: write # needed for ghcr access | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
with: | |
charts_dir: charts | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
CR_SKIP_EXISTING: "true" | |
- name: Push charts to GHCR | |
run: | | |
shopt -s nullglob | |
for pkg in .cr-release-packages/*; do | |
[ -z "${pkg:-}" ] && break | |
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" && echo '::warning:: helm push failed!' | |
done |