Skip to content

Commit 85aac6a

Browse files
committed
chore(workflow): add check k3s version
1 parent e588fb5 commit 85aac6a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

_scripts/install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ function configure_mirrors {
146146
k3s_install_url="https://get.k3s.io"
147147
K3S_RELEASE_URL=github.com/k3s-io/k3s/releases
148148
fi
149-
INSTALL_K3S_VERSION=$(curl -Ls "$K3S_RELEASE_URL" | grep /k3s-io/k3s/releases/tag/ | sed -E 's/.*\/k3s-io\/k3s\/releases\/tag\/(v[0-9\.]{1,}[rc0-9\-]{0,}%2Bk3s[0-9])".*/\1/g' | head -1)
150-
export INSTALL_K3S_VERSION
149+
if [ -z "${INSTALL_K3S_VERSION}" ]; then
150+
INSTALL_K3S_VERSION=$(curl -Ls "$K3S_RELEASE_URL" | grep /k3s-io/k3s/releases/tag/ | sed -E 's/.*\/k3s-io\/k3s\/releases\/tag\/(v[0-9\.]{1,}[rc0-9\-]{0,}%2Bk3s[0-9])".*/\1/g' | head -1)
151+
export INSTALL_K3S_VERSION
152+
fi
151153
echo -e "\\033[32m---> Configuring mirrors finish\\033[0m"
152154
}
153155

0 commit comments

Comments
 (0)