mirror of
https://github.com/rancher/k3k.git
synced 2026-03-04 10:42:33 +00:00
32 lines
867 B
Bash
Executable File
32 lines
867 B
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
|
|
source $(dirname $0)/version
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
git fetch --tags
|
|
CHART_TAG=chart-$(grep "version: " charts/k3k/Chart.yaml | awk '{print $2}')
|
|
if [ $(git tag -l "$version") ]; then
|
|
echo "tag already exists"
|
|
exit 1
|
|
fi
|
|
|
|
# update the index.yaml
|
|
cr index --token ${GITHUB_TOKEN} \
|
|
--release-name-template "chart-{{ .Version }}" \
|
|
--package-path ./deploy/ \
|
|
--index-path index.yaml \
|
|
--git-repo k3k \
|
|
-o rancher
|
|
|
|
# push to gh-pages
|
|
git config --global user.email "hussein.galal.ahmed.11@gmail.com"
|
|
git config --global user.name "galal-hussein"
|
|
git config --global url.https://${GITHUB_TOKEN}@github.com/.insteadOf https://github.com/
|
|
|
|
# push index.yaml to gh-pages
|
|
git add index.yaml
|
|
git commit -m "add chart-${CHART_TAG} to index.yaml"
|
|
git push --force --set-upstream origin HEAD:gh-pages
|