-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhelm-release.sh
30 lines (23 loc) · 1.04 KB
/
helm-release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
install_chart_releaser() {
if [[ ! -d "$RUNNER_TOOL_CACHE" ]]; then
echo "Cache directory '$RUNNER_TOOL_CACHE' does not exist" >&2
exit 1
fi
local arch
arch=$(uname -m)
local cache_dir="$RUNNER_TOOL_CACHE/ct/$version/$arch"
if [[ ! -d "$cache_dir" ]]; then
mkdir -p "$cache_dir"
echo "Installing chart-releaser..."
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v1.2.1/chart-releaser_1.2.1_linux_amd64.tar.gz"
tar -xzf cr.tar.gz -C "$cache_dir"
rm -f cr.tar.gz
echo 'Adding cr directory to PATH...'
export PATH="$cache_dir:$PATH"
fi
}
install_chart_releaser
cr package k8s/openstad -p k8s/helmrepo;
cr upload --git-repo openstad-kubernetes --owner $OWNER --token $CR_TOKEN -p k8s/helmrepo --skip-existing
cr index --charts-repo https://$OWNER.github.io/openstad-kubernetes --git-repo openstad-kubernetes --owner $OWNER --token $CR_TOKEN -p k8s/helmrepo --pr --pages-branch $PAGES_BRANCH -i index.yaml