diff --git a/src/controller/artifact/controller.go b/src/controller/artifact/controller.go index 4bcea401f16..657f11a45e5 100644 --- a/src/controller/artifact/controller.go +++ b/src/controller/artifact/controller.go @@ -173,18 +173,16 @@ func (c *controller) Ensure(ctx context.Context, repository, digest string, opti } } } - if created { - // fire event for create - e := &metadata.PushArtifactEventMetadata{ - Ctx: ctx, - Artifact: artifact, - } + // fire event for create + e := &metadata.PushArtifactEventMetadata{ + Ctx: ctx, + Artifact: artifact, + } - if option != nil && len(option.Tags) > 0 { - e.Tag = option.Tags[0] - } - notification.AddEvent(ctx, e) + if option != nil && len(option.Tags) > 0 { + e.Tag = option.Tags[0] } + notification.AddEvent(ctx, e) return created, artifact.ID, nil }