add GitHub token to install_kustomize.sh

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
This commit is contained in:
vsoch
2022-12-23 01:34:54 -07:00
parent 738ca56ccd
commit 3c44db8746

View File

@@ -134,7 +134,12 @@ s390x)
;;
esac
# You can authenticate by exporting the GITHUB_TOKEN in the environment
if [[ -z "${GITHUB_TOKEN}" ]]; then
releases=$(curl -s "$release_url")
else
releases=$(curl -s "$release_url" --header "Authorization: Bearer ${GITHUB_TOKEN}")
fi
if [[ $releases == *"API rate limit exceeded"* ]]; then
echo "Github rate-limiter failed the request. Either authenticate or wait a couple of minutes."