fix(ci): Harbor 存在性校验 Accept 补 OCI 媒体类型——CI 镜像是 OCI index,仅 docker schema2 会 404 MANIFEST_UNKNOWN(休眠校验被 secrets 补齐后首次执行暴露)

This commit is contained in:
chenhuan committed 2026-11-03 01:19:35 +00:00
1 parent bb83f177cd
commit c620129717
1 file changed
+4 -1
+4 -1
View File
@@ -392,7 +392,10 @@ elif explicit:
for repo in e["repos"]:
url = f"http://{HARBOR_HOST}/v2/mixingx/{repo}/manifests/{e['harborTag']}"
req = urllib.request.Request(url, headers={
"Accept": "application/vnd.docker.distribution.manifest.v2+json",
"Accept": ("application/vnd.oci.image.index.v1+json, "
"application/vnd.oci.image.manifest.v1+json, "
"application/vnd.docker.distribution.manifest.v2+json, "
"application/vnd.docker.distribution.manifest.list.v2+json"),
"Authorization": f"Basic {auth}"})
try:
with urllib.request.urlopen(req, timeout=15) as r: