feat: unique stages names
All checks were successful
build / build (push) Successful in 1m17s
build / trigger-build-image (push) Successful in 6s

This commit is contained in:
张泊明518370910136 2024-10-05 03:13:24 -04:00
parent d76fe99811
commit 0b248aad6b
GPG Key ID: D47306D7062CDA9D

View File

@ -34,10 +34,16 @@ func getCommitMsg() (msg string, err error) {
func generateStages(conf Conf, group string) ([]stage.Stage, error) {
stages := []stage.Stage{}
existNames := map[string]bool{}
for _, s := range conf.Stages {
if s.Group != "" && group != s.Group {
continue
}
_, ok := existNames[s.Name] // check for existence
if ok {
continue
}
existNames[s.Name] = true
var cmds []stage.Cmd
defaultCmd := s.Executor.With.Default
for _, optionalCmd := range s.Executor.With.Cases {