diff --git a/.github/workflows/gcr.io_mirror.yml b/.github/workflows/gcr.io_mirror.yml index 8e6a595..5035774 100644 --- a/.github/workflows/gcr.io_mirror.yml +++ b/.github/workflows/gcr.io_mirror.yml @@ -174,12 +174,23 @@ jobs: console.log(gcrImg) let colonIndex = gcrImg.indexOf(":") - console.log(colonIndex) - if colonIndex>0 { - gcrImg=gcrImg.substr(0,colonIndex) + if (colonIndex > 0) { + gcrImg = gcrImg.substr(0,colonIndex) + } + + let names = gcrImg.split("/") + let registry = names[0] + names=names.splice(1,2) + if("gcr.io" == registry){ + body+="\n k8s.gcr.io Api(需梯子) \n\n k8s.gcr.io UI(需梯子) \n\n" + }else{ + let uri=names[0]+"/global/"+names[1] + if(names.length==1){ + uri="global/"+names[0] + } + body+="\n gcr.io Api(需梯子) \n\n gcr.io UI \n\n" } - console.log(gcrImg) const issuesComment = await github.issues.createComment({ owner: '${{ env.GH_USER }}',