Dont use prerelease when upgrading talos

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2024-07-19 11:58:47 +01:00
parent 1e6b1a9c92
commit 5eaee93d3e
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -9,7 +9,7 @@ if [[ "${TALOSCONFIG}" == "" ]]; then
exit 1
fi
LATEST_RELEASE=$(curl --silent https://api.github.com/repos/siderolabs/talos/releases | jq -r '.[0]')
LATEST_RELEASE=$(curl --silent https://api.github.com/repos/siderolabs/talos/releases | jq -r '[.[] | select(.prerelease == false)] | .[0]')
TALOS_VERSION="$(jq --argjson LATEST_RELEASE "$LATEST_RELEASE" -c -n -r '$LATEST_RELEASE.tag_name')"
KUBERNETES_VERSION="$(jq --argjson LATEST_RELEASE "$LATEST_RELEASE" -c -n -r '$LATEST_RELEASE.body | match("registry.k8s.io/kube-apiserver:v([0-9\\.]+)") | .captures[0].string')"