fix(actions): use gitea's clock for actions durations (#39323)

This commit is contained in:
silverwind
2026-09-16 06:53:15 +00:00
committed by GitHub
parent 62945266d4
commit 7efd24b28f
7 changed files with 36 additions and 34 deletions
+4
View File
@@ -163,6 +163,10 @@ func UpdateRunAttempt(ctx context.Context, attempt *ActionRunAttempt, cols ...st
attempt.Started = timeutil.TimeStampNow()
cols = append(cols, "started")
}
if slices.Contains(cols, "status") && !attempt.Stopped.IsZero() && !attempt.Status.IsDone() {
attempt.Stopped = 0
cols = append(cols, "stopped")
}
sess := db.GetEngine(ctx).ID(attempt.ID)
if len(cols) > 0 {