mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Default clone do checkout tags on tag pipeline (#1110)
This commit is contained in:
parent
93c96de2ac
commit
fc862bf627
1 changed files with 5 additions and 1 deletions
|
@ -128,10 +128,14 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
|
||||||
if len(c.defaultCloneImage) > 0 {
|
if len(c.defaultCloneImage) > 0 {
|
||||||
cloneImage = c.defaultCloneImage
|
cloneImage = c.defaultCloneImage
|
||||||
}
|
}
|
||||||
|
cloneSettings := map[string]interface{}{"depth": "0"}
|
||||||
|
if c.metadata.Curr.Event == frontend.EventTag {
|
||||||
|
cloneSettings["tags"] = "true"
|
||||||
|
}
|
||||||
container := &yaml.Container{
|
container := &yaml.Container{
|
||||||
Name: defaultCloneName,
|
Name: defaultCloneName,
|
||||||
Image: cloneImage,
|
Image: cloneImage,
|
||||||
Settings: map[string]interface{}{"depth": "0"},
|
Settings: cloneSettings,
|
||||||
Environment: c.cloneEnv,
|
Environment: c.cloneEnv,
|
||||||
}
|
}
|
||||||
name := fmt.Sprintf("%s_clone", c.prefix)
|
name := fmt.Sprintf("%s_clone", c.prefix)
|
||||||
|
|
Loading…
Reference in a new issue