@@ -34,7 +34,7 @@ var CmdMigrateStorage = &cli.Command{
34
34
Name : "type" ,
35
35
Aliases : []string {"t" },
36
36
Value : "" ,
37
- Usage : "Type of stored files to copy. Allowed types: 'attachments', 'lfs', 'avatars', 'repo-avatars', 'repo-archivers', 'packages', 'actions-log'" ,
37
+ Usage : "Type of stored files to copy. Allowed types: 'attachments', 'lfs', 'avatars', 'repo-avatars', 'repo-archivers', 'packages', 'actions-log', 'actions-artifacts " ,
38
38
},
39
39
& cli.StringFlag {
40
40
Name : "storage" ,
@@ -160,6 +160,13 @@ func migrateActionsLog(ctx context.Context, dstStorage storage.ObjectStorage) er
160
160
})
161
161
}
162
162
163
+ func migrateActionsArtifacts (ctx context.Context , dstStorage storage.ObjectStorage ) error {
164
+ return db .Iterate (ctx , nil , func (ctx context.Context , artifact * actions_model.ActionArtifact ) error {
165
+ _ , err := storage .Copy (dstStorage , artifact .ArtifactPath , storage .ActionsArtifacts , artifact .ArtifactPath )
166
+ return err
167
+ })
168
+ }
169
+
163
170
func runMigrateStorage (ctx * cli.Context ) error {
164
171
stdCtx , cancel := installSignals ()
165
172
defer cancel ()
@@ -223,13 +230,14 @@ func runMigrateStorage(ctx *cli.Context) error {
223
230
}
224
231
225
232
migratedMethods := map [string ]func (context.Context , storage.ObjectStorage ) error {
226
- "attachments" : migrateAttachments ,
227
- "lfs" : migrateLFS ,
228
- "avatars" : migrateAvatars ,
229
- "repo-avatars" : migrateRepoAvatars ,
230
- "repo-archivers" : migrateRepoArchivers ,
231
- "packages" : migratePackages ,
232
- "actions-log" : migrateActionsLog ,
233
+ "attachments" : migrateAttachments ,
234
+ "lfs" : migrateLFS ,
235
+ "avatars" : migrateAvatars ,
236
+ "repo-avatars" : migrateRepoAvatars ,
237
+ "repo-archivers" : migrateRepoArchivers ,
238
+ "packages" : migratePackages ,
239
+ "actions-log" : migrateActionsLog ,
240
+ "actions-artifacts" : migrateActionsArtifacts ,
233
241
}
234
242
235
243
tp := strings .ToLower (ctx .String ("type" ))
0 commit comments