fix latest version as latest
Some checks failed
Test STACKIT Auth Action / test (push) Failing after 34s

This commit is contained in:
jaime merino 2026-04-28 14:24:24 +02:00
parent 87ef60f2fc
commit 2b97001a94

View file

@ -30,6 +30,12 @@ runs:
run: |
VERSION="${{ inputs.cli-version }}"
if [ "$VERSION" = "latest" ]; then
VERSION=$(curl -s https://api.github.com/repos/stackitcloud/stackit-cli/releases/latest | jq -r '.tag_name')
else
VERSION="v$VERSION"
fi
# Detect OS
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
case "$OS" in
@ -50,9 +56,9 @@ runs:
EXT="tar.gz"
if [ "$OS" = "windows" ]; then EXT="zip"; fi
URL="https://github.com/stackitcloud/stackit-cli/releases/download/v${VERSION}/stackit-cli_${VERSION}_${OS}_${ARCH}.${EXT}"
URL="https://github.com/stackitcloud/stackit-cli/releases/download/${VERSION}/stackit-cli_${VERSION}_${OS}_${ARCH}.${EXT}"
echo "Downloading STACKIT CLI v${VERSION} for ${OS}/${ARCH}..."
echo "Downloading STACKIT CLI ${VERSION} for ${OS}/${ARCH}..."
if [ "$OS" = "windows" ]; then
curl -sL "$URL" -o stackit.zip
unzip -q stackit.zip