-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
35 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,44 +64,44 @@ jobs: | |
uses: azure/setup-helm@v4 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_SKIP_EXISTING: "true" | ||
CR_RELEASE_NAME_TEMPLATE: "kubeai-helm-chart-{{ .Name }}-{{ .Version }}" | ||
# The chart-releaser action is not able to publish all the the chart on tag push. | ||
# It only published the kubeai chart. Below is the original code used. | ||
#- name: Run chart-releaser | ||
# uses: helm/[email protected] | ||
# env: | ||
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
# CR_SKIP_EXISTING: "true" | ||
# CR_RELEASE_NAME_TEMPLATE: "kubeai-helm-chart-{{ .Version }}" | ||
# Workaround for always publishing all charts on tag push. | ||
# The workaround may not be needed if we set | ||
# CR_RELEASE_NAME_TEMPLATE: "kubeai-helm-chart-{{ .Name }}-{{ .Version }}" | ||
# 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 | ||
# - 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 |