mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 22:47:21 +00:00
Display image size for multiarch container images (#23821)
Fixes #23771 Changes the display of different architectures for multiarch images to show the image size: 
This commit is contained in:
@ -62,7 +62,13 @@ type Metadata struct {
|
||||
DocumentationURL string `json:"documentation_url,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
ImageLayers []string `json:"layer_creation,omitempty"`
|
||||
MultiArch map[string]string `json:"multiarch,omitempty"`
|
||||
Manifests []*Manifest `json:"manifests,omitempty"`
|
||||
}
|
||||
|
||||
type Manifest struct {
|
||||
Platform string `json:"platform"`
|
||||
Digest string `json:"digest"`
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
|
||||
// ParseImageConfig parses the metadata of an image config
|
||||
|
@ -46,7 +46,7 @@ func TestParseImageConfig(t *testing.T) {
|
||||
},
|
||||
metadata.Labels,
|
||||
)
|
||||
assert.Empty(t, metadata.MultiArch)
|
||||
assert.Empty(t, metadata.Manifests)
|
||||
|
||||
configHelm := `{"description":"` + description + `", "home": "` + projectURL + `", "sources": ["` + repositoryURL + `"], "maintainers":[{"name":"` + author + `"}]}`
|
||||
|
||||
|
Reference in New Issue
Block a user