fix: ci failed (#4353)

This commit is contained in:
yihong
2026-07-07 10:38:41 +08:00
committed by GitHub
parent 85ba51ce72
commit e4ecb1bce5
+5 -1
View File
@@ -297,6 +297,7 @@ jobs:
read -r console_url console_sha256 < <("$python_bin" - "$console_json" <<'PY'
import json
import re
import sys
with open(sys.argv[1], encoding="utf-8") as handle:
@@ -307,7 +308,10 @@ jobs:
digest = asset.get("digest", "")
url = asset.get("browser_download_url", "")
if name.startswith("rustfs-console-") and name.endswith(".zip") and digest.startswith("sha256:") and url:
print(url, digest.split(":", 1)[1])
sha256 = digest.split(":", 1)[1]
if not re.fullmatch(r"[0-9a-fA-F]{64}", sha256):
raise SystemExit(f"console zip asset has invalid sha256 digest: {sha256}")
sys.stdout.buffer.write(f"{url} {sha256}\n".encode("utf-8"))
break
else:
raise SystemExit("no console zip asset with sha256 digest found")