Files
mikrotik-operator/hack/install-helm.sh
T
feedc0de 5cbd3da40b
Validate and publish / Test image and chart (push) Successful in 2m58s
Validate and publish / Publish image and OCI chart (push) Failing after 23s
Update CI and package prefix
2026-08-28 23:22:26 +02:00

25 lines
883 B
Bash

#!/usr/bin/env bash
set -euo pipefail
: "${HELM_VERSION:?HELM_VERSION must be set, for example v4.2.2}"
: "${RUNNER_TEMP:?RUNNER_TEMP must be set}"
archive="helm-${HELM_VERSION}-linux-amd64.tar.gz"
checksum="${archive}.sha256sum"
curl --fail --silent --show-error --location \
--output "${RUNNER_TEMP}/${archive}" \
"https://get.helm.sh/${archive}"
curl --fail --silent --show-error --location \
--output "${RUNNER_TEMP}/${checksum}" \
"https://get.helm.sh/${checksum}"
# The upstream checksum contains the upstream archive basename, so preserve
# that basename and perform the check from its containing directory.
(cd "${RUNNER_TEMP}" && sha256sum --check "${checksum}")
tar --extract --gzip --file "${RUNNER_TEMP}/${archive}" \
--directory "${RUNNER_TEMP}" linux-amd64/helm
mv "${RUNNER_TEMP}/linux-amd64/helm" "${RUNNER_TEMP}/helm"
chmod 0700 "${RUNNER_TEMP}/helm"