Skip to content

Commit bb1a8ac

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Optimize runner-tags layout to enhance visual experience (go-gitea#31258) fix: allow actions artifacts storage migration to complete succesfully (go-gitea#31251)
2 parents d4e4925 + 06ebae7 commit bb1a8ac

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

cmd/migrate_storage.go

+16-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ package cmd
55

66
import (
77
"context"
8+
"errors"
89
"fmt"
10+
"io/fs"
911
"strings"
1012

1113
actions_model "code.gitea.io/gitea/models/actions"
@@ -194,8 +196,20 @@ func migrateActionsLog(ctx context.Context, dstStorage storage.ObjectStorage) er
194196

195197
func migrateActionsArtifacts(ctx context.Context, dstStorage storage.ObjectStorage) error {
196198
return db.Iterate(ctx, nil, func(ctx context.Context, artifact *actions_model.ActionArtifact) error {
197-
_, err := storage.Copy(dstStorage, artifact.ArtifactPath, storage.ActionsArtifacts, artifact.ArtifactPath)
198-
return err
199+
if artifact.Status == int64(actions_model.ArtifactStatusExpired) {
200+
return nil
201+
}
202+
203+
_, err := storage.Copy(dstStorage, artifact.StoragePath, storage.ActionsArtifacts, artifact.StoragePath)
204+
if err != nil {
205+
// ignore files that do not exist
206+
if errors.Is(err, fs.ErrNotExist) {
207+
return nil
208+
}
209+
return err
210+
}
211+
212+
return nil
199213
})
200214
}
201215

templates/shared/actions/runner_list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
7171
<td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td>
7272
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString ctx.Locale}}</span></td>
73-
<td class="runner-tags">
73+
<td class="tw-flex tw-flex-wrap tw-gap-2 runner-tags">
7474
{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}
7575
</td>
7676
<td>{{if .LastOnline}}{{TimeSinceUnix .LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td>

0 commit comments

Comments
 (0)