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 -1
View File
@@ -174,7 +174,10 @@ func (run *ActionRun) LoadRepo(ctx context.Context) error {
}
func (run *ActionRun) Duration() time.Duration {
d := calculateDuration(run.Started, run.Stopped, run.Status, run.Updated) + run.PreviousDuration
d := calculateDuration(run.Started, run.Stopped, run.Status, run.Updated)
if run.LatestAttemptID == 0 {
d += run.PreviousDuration
}
if d < 0 {
return 0
}