Add apk fallback for native dotnet deps on musl/Alpine runners
Some checks failed
CI / build-and-push (push) Successful in 38s
CI / deploy-qa (push) Successful in 12s
CI / smoke-qa (push) Failing after 14s

dotnet-install.sh silently picks the linux-musl-x64 SDK on this runner,
which has no apt-get - only apk - so the previous apt-only fix still failed.
This commit is contained in:
2026-07-04 18:16:39 -07:00
parent 8427e4c8a1
commit ec6bb38902

View File

@@ -65,15 +65,20 @@ ensure_dotnet_native_deps() {
fi
log "libstdc++.so.6 missing; installing native runtime deps for dotnet"
local sudo_cmd=""
if [[ "$(id -u)" -ne 0 ]] && command -v sudo > /dev/null 2>&1; then
sudo_cmd="sudo"
fi
if command -v apt-get > /dev/null 2>&1; then
local sudo_cmd=""
if [[ "$(id -u)" -ne 0 ]] && command -v sudo > /dev/null 2>&1; then
sudo_cmd="sudo"
fi
$sudo_cmd apt-get update -y
$sudo_cmd apt-get install -y --no-install-recommends libstdc++6 libgcc-s1 libicu-dev ca-certificates
elif command -v apk > /dev/null 2>&1; then
# Alpine/musl runner - dotnet-install.sh falls back to the linux-musl-x64 SDK
# here, which still wants a real libstdc++/libgcc (not just gcompat).
$sudo_cmd apk add --no-cache libstdc++ libgcc icu-libs ca-certificates
else
fail "libstdc++.so.6 missing and apt-get unavailable; install a C++ runtime manually on this runner"
fail "libstdc++.so.6 missing and neither apt-get nor apk is available; install a C++ runtime manually on this runner"
fi
}