mirror of
https://github.com/drone-plugins/drone-docker.git
synced 2026-06-14 05:13:02 +08:00
Use random string as temporary tag
This commit is contained in:
@@ -583,14 +583,3 @@ func getDigest(buildName string) (string, error) {
|
|||||||
}
|
}
|
||||||
return "", errors.New("unable to fetch digest")
|
return "", errors.New("unable to fetch digest")
|
||||||
}
|
}
|
||||||
|
|
||||||
func getUniqueBuildName(repo, buildName string) string {
|
|
||||||
var shortenCommitSHA string
|
|
||||||
if len(buildName) <= 8 {
|
|
||||||
shortenCommitSHA = buildName
|
|
||||||
} else {
|
|
||||||
shortenCommitSHA = buildName[:8]
|
|
||||||
}
|
|
||||||
imageName := repo[strings.LastIndex(repo, "/")+1:]
|
|
||||||
return fmt.Sprintf("%s-%s", imageName, shortenCommitSHA)
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user