Default clone do checkout tags on tag pipeline (#1110)

This commit is contained in:
Anbraten 2022-08-15 11:52:30 +02:00 committed by GitHub
parent 93c96de2ac
commit fc862bf627
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,10 +128,14 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
if len(c.defaultCloneImage) > 0 {
cloneImage = c.defaultCloneImage
}
cloneSettings := map[string]interface{}{"depth": "0"}
if c.metadata.Curr.Event == frontend.EventTag {
cloneSettings["tags"] = "true"
}
container := &yaml.Container{
Name: defaultCloneName,
Image: cloneImage,
Settings: map[string]interface{}{"depth": "0"},
Settings: cloneSettings,
Environment: c.cloneEnv,
}
name := fmt.Sprintf("%s_clone", c.prefix)