helm: bump chartVersions and appVersion to v0.10.0 (#291) #26
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: Release Helm Charts | |
# It's important that these 2 steps happen in sequence because they | |
# both need to push a commit to the gh-pages branch. | |
on: | |
push: | |
tags: | |
- helm-v* | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
with: | |
version: v3.14.4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
check-latest: true | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.6.1 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Run chart-testing (lint) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | |
release: | |
needs: lint | |
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions | |
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
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: Install Helm | |
uses: azure/setup-helm@v4 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@v1.6.0 | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
CR_SKIP_EXISTING: "true" | |
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Name }}-{{ .Version }}" | |
# TODO (samos123): Remove these comments after next helm release. | |
# The chart-releaser action is not able to publish all the the chart on tag push. | |
# It only published the kubeai chart. | |
# Workaround that was used for always publishing all charts on tag push. | |
# Source: https://github.com/helm/chart-releaser-action/issues/8#issuecomment-962501009 | |
# - name: Package and upload helm chart | |
# run: | | |
# set -xe | |
# # donwload helm chart releaser | |
# VERSION=v1.6.1 | |
# curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/${VERSION}/chart-releaser_1.6.1_linux_amd64.tar.gz" | |
# tar -xzf cr.tar.gz | |
# rm -f cr.tar.gz | |
# owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY") | |
# repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY") | |
# # package charts | |
# ./cr package charts/kubeai | |
# ./cr package charts/models | |
# # upload chart to github relases | |
# ./cr upload \ | |
# --owner "$owner" \ | |
# --git-repo "$repo" \ | |
# --token "${{ secrets.GITHUB_TOKEN }}" \ | |
# --skip-existing \ | |
# --release-name-template "kubeai-helm-chart-{{ .Name }}-{{ .Version }}" \ | |
# # update index and push to github pages | |
# ./cr index \ | |
# --owner "$owner" \ | |
# --git-repo "$repo" \ | |
# --token "${{ secrets.GITHUB_TOKEN }}" \ | |
# --release-name-template "kubeai-helm-chart-{{ .Name }}-{{ .Version }}" \ | |
# --index-path ./index.yaml \ | |
# --charts-repo https://$owner.github.io/$repo \ | |
# --push |