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

This commit is contained in:
silverwind
2026-09-16 08:53:15 +02:00
committed by GitHub
parent 62945266d4
commit 7efd24b28f
7 changed files with 36 additions and 34 deletions
+6 -3
View File
@@ -46,6 +46,7 @@ type JobStepState = {
cursor: string|null,
expanded: boolean,
manuallyCollapsed: boolean, // whether the user manually collapsed the step, used to avoid auto-expanding it again
firstLogTime?: number, // the step's first log line time, what "Show seconds" counts from
}
// one ANSI renderer per step, so an unterminated color carries between that step's lines only
@@ -81,7 +82,6 @@ type JobData = {
stepsLog?: Array<{
step: number;
cursor: string | null;
started: number;
lines: LogLine[];
}>;
},
@@ -355,9 +355,12 @@ async function loadJob() {
// append logs to the UI
for (const stepLogs of jobLogs) {
const stepState = currentJobStepsStates.value[stepLogs.step];
// save the cursor, it will be passed to backend next time
currentJobStepsStates.value[stepLogs.step].cursor = stepLogs.cursor;
appendLogs(stepLogs.step, stepLogs.started, stepLogs.lines);
stepState.cursor = stepLogs.cursor;
if (!stepLogs.lines.length) continue;
stepState.firstLogTime ??= stepLogs.lines[0].timestamp;
appendLogs(stepLogs.step, stepState.firstLogTime, stepLogs.lines);
}
// auto-scroll to the last log line of the last step