diff --git a/internal/actions/publishEvent.go b/internal/actions/publishEvent.go index f10ddc8c..056e2931 100644 --- a/internal/actions/publishEvent.go +++ b/internal/actions/publishEvent.go @@ -49,9 +49,7 @@ func PublishEvent() error { return processingErr } - if !strings.Contains(strings.ToLower(os.Getenv("GH_ACTION_RESULT")), "success") { - return fmt.Errorf("failure in publishing: %s", os.Getenv("GH_ACTION_RESULT")) - } + event.Success = strings.Contains(strings.ToLower(os.Getenv("GH_ACTION_RESULT")), "success") return nil }) diff --git a/internal/telemetry/telemetry.go b/internal/telemetry/telemetry.go index 11a55baf..07c3612c 100644 --- a/internal/telemetry/telemetry.go +++ b/internal/telemetry/telemetry.go @@ -129,7 +129,11 @@ func Track(ctx context.Context, exec shared.InteractionType, fn func(ctx context runEvent.LocalCompletedAt = &curTime duration := runEvent.LocalCompletedAt.Sub(runEvent.LocalStartedAt).Milliseconds() runEvent.DurationMs = &duration - runEvent.Success = err == nil + + // For publishing events runEvent success is set by publishEvent.go + if exec != shared.InteractionTypePublish { + runEvent.Success = err == nil + } currentIntegrationEnvironment := "GITHUB_ACTIONS" runEvent.ContinuousIntegrationEnvironment = ¤tIntegrationEnvironment