diff --git a/setup-go/action.yml b/setup-go/action.yml index 0db817e..ec878a7 100644 --- a/setup-go/action.yml +++ b/setup-go/action.yml @@ -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