cron task to cleanup dangling container images with version sha256:*

Fixes: https://codeberg.org/forgejo/forgejo/issues/4378
This commit is contained in:
Earl Warren 2024-07-26 19:39:19 +02:00
parent d30be160c9
commit f19f31ac73
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 383 additions and 0 deletions

View file

@ -21,6 +21,9 @@ func Cleanup(ctx context.Context, olderThan time.Duration) error {
if err := cleanupExpiredBlobUploads(ctx, olderThan); err != nil {
return err
}
if err := CleanupSHA256(ctx, olderThan); err != nil {
return err
}
return cleanupExpiredUploadedBlobs(ctx, olderThan)
}