Support helm charts #11
Workflow file for this run
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: Releases Charts | |
on: | |
push: | |
# branches: | |
# - release-* | |
paths: | |
- charts/kwok/Chart.yaml | |
- charts/stage-fast/Chart.yaml | |
#env: | |
# PUSH: 'true' | |
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
releases: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # important parameter for helm chart | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
- name: Set up Git user | |
# - name: Login to GitHub Container Registry | |
# run: | | |
# helm registry login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
# - name: Release oci charts to ghcr.io | |
# env: | |
# IMAGE_PREFIX: ghcr.io/${{ github.repository }} | |
# run: | | |
# make oci-charts | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Release charts | |
uses: helm/[email protected] | |
# if: ${{ env.PUSH == 'true' }} | |
env: | |
CR_RELEASE_NAME_TEMPLATE: "{{ .Name }}-helm-chart-{{ .Version }}" | |
CR_MAKE_RELEASE_LATEST: false | |
CR_SKIP_EXISTING: true | |
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to GHCR | |
run: | | |
helm registry login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
- name: Release Charts to GHCR | |
run: | | |
for pkg in .cr-release-packages/*; do | |
if [ -z "${pkg:-}" ]; then | |
break | |
fi | |
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}/charts | |
done |