fix: empty groups
All checks were successful
submodules sync / sync (push) Successful in 39s
build / build (push) Successful in 2m16s
build / trigger-build-image (push) Successful in 14s

This commit is contained in:
张泊明518370910136 2025-09-24 03:32:34 -07:00
parent 7e12c333b5
commit fd47361268
GPG Key ID: D47306D7062CDA9D

View File

@ -47,7 +47,7 @@ func generateStages(confStages []conf.ConfStage, groups []string) (
if s.Name == "" {
s.Name = fmt.Sprintf("stage-%d", i)
}
var ok bool
ok := false
if s.Group != "" {
for _, group := range groups {
if strings.EqualFold(group, s.Group) {
@ -69,7 +69,7 @@ func generateStages(confStages []conf.ConfStage, groups []string) (
}
}
}
if !ok {
if !ok && len(groups) > 0 {
continue
}
_, ok = existNames[s.Name] // check for existence