bugfix: fix artifact image tag set func (#2870)

Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
zuoxuesong-worker 2025-11-25 16:01:42 +08:00 committed by GitHub
parent 4e3a92acec
commit 976a807711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,13 +143,16 @@ func (o *ArtifactImagesOptions) Complete(cmd *cobra.Command, args []string) (*kk
} }
o.Playbook = args[0] o.Playbook = args[0]
var tags = []string{"image_registry"} var tags = make([]string, 0)
if o.Push { if o.Push {
tags = append(tags, "push") tags = append(tags, "push")
} }
if o.Pull { if o.Pull {
tags = append(tags, "pull") tags = append(tags, "pull")
} }
if !o.Pull && !o.Push {
tags = append(tags, "image_registry")
}
playbook.Spec = kkcorev1.PlaybookSpec{ playbook.Spec = kkcorev1.PlaybookSpec{
Playbook: o.Playbook, Playbook: o.Playbook,