This commit is contained in:
AnJia 2022-05-24 09:46:33 +08:00 committed by GitHub
parent c71c543173
commit 17a3f6ef1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 4 deletions

View File

@ -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(需梯子) <https://k8s.gcr.io/v2/"+names.join("/")+"/tags/list>\n\n k8s.gcr.io UI(需梯子) <https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/"+names.join("/")+">\n\n"
}else{
let uri=names[0]+"/global/"+names[1]
if(names.length==1){
uri="global/"+names[0]
}
body+="\n gcr.io Api(需梯子) <https://gcr.io/v2/"+names.join("/")+"/tags/list>\n\n gcr.io UI <https://console.cloud.google.com/gcr/images/"+uri+">\n\n"
}
console.log(gcrImg)
const issuesComment = await github.issues.createComment({
owner: '${{ env.GH_USER }}',