From 88d9c33a807fb17f14650b04d06c6d1c95890a8c Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Fri, 24 May 2024 16:42:09 +0200 Subject: [PATCH] Upload acceptance artifacts before commenting on a pull request --- acceptance/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/acceptance/main.go b/acceptance/main.go index cab58b3..1481249 100644 --- a/acceptance/main.go +++ b/acceptance/main.go @@ -77,6 +77,10 @@ func (a *acceptance) trigger(ctx context.Context) (*notify.Notification, error) if err != nil { return nil, fmt.Errorf("report: %w", err) } + err = a.Upload(ctx, artifactDir) + if err != nil { + return nil, fmt.Errorf("upload artifact: %w", err) + } // better be redacting twice, right? summary := redact.ReplaceAll(report.StepSummary()) a.Action.AddStepSummary(summary) @@ -84,10 +88,6 @@ func (a *acceptance) trigger(ctx context.Context) (*notify.Notification, error) if err != nil { return nil, fmt.Errorf("comment: %w", err) } - err = a.Upload(ctx, artifactDir) - if err != nil { - return nil, fmt.Errorf("upload artifact: %w", err) - } runUrl, err := a.RunURL(ctx) if err != nil { return nil, fmt.Errorf("run url: %w", err)