skip push step for provider services

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours 2025-05-12 10:29:37 +02:00 committed by Nicolas De loof
parent 7cea455c4d
commit 91a0aa0265

View File

@ -62,7 +62,7 @@ func (s *composeService) push(ctx context.Context, project *types.Project, optio
w := progress.ContextWriter(ctx)
for _, service := range project.Services {
if service.Build == nil || service.Image == "" {
if options.ImageMandatory && service.Image == "" {
if options.ImageMandatory && service.Image == "" && service.Provider == nil {
return fmt.Errorf("%q attribute is mandatory to push an image for service %q", "service.image", service.Name)
}
w.Event(progress.Event{