fix: use wget fallback when curl missing (bare Alpine runner)

This commit is contained in:
2026-05-22 18:55:00 +01:00
parent e96c7c5bf1
commit 537235c17b
+8 -1
View File
@@ -30,7 +30,14 @@ runs:
fi
echo "Installing Go $GO_VERSION..."
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz
# Use wget on Alpine (no curl), curl elsewhere
if command -v curl &>/dev/null; then
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz
elif command -v wget &>/dev/null; then
wget -qO- "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz
else
apk add --no-cache curl && curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz
fi
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
export PATH="/usr/local/go/bin:$PATH"
go version