summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-09-14 22:45:13 +0200
committerGitHub <noreply@github.com>2022-09-14 22:45:13 +0200
commitef40324c431a6cf58ff775128da48fc48c9852fe (patch)
tree5604cbdcb9ad7deef3e204cb4090f549f45fac79
parentcad8f1b1fe77f40f4b59dac14b926b71a18a3354 (diff)
downloadgitea-ef40324c431a6cf58ff775128da48fc48c9852fe.tar.gz
gitea-ef40324c431a6cf58ff775128da48fc48c9852fe.zip
Display image digest for container packages (#21170)
fixes #21160
-rw-r--r--options/locale/locale_en-US.ini1
-rw-r--r--templates/package/content/container.tmpl4
2 files changed, 5 insertions, 0 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 6845680ccf..b62395e546 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -3092,6 +3092,7 @@ container.details.platform = Platform
container.details.repository_site = Repository Site
container.details.documentation_site = Documentation Site
container.pull = Pull the image from the command line:
+container.digest = Digest:
container.documentation = For more information on the Container registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/container/">the documentation</a>.
container.multi_arch = OS / Arch
container.layers = Image Layers
diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl
index 44a64d13ee..939dfe4020 100644
--- a/templates/package/content/container.tmpl
+++ b/templates/package/content/container.tmpl
@@ -15,6 +15,10 @@
{{end}}
</div>
<div class="field">
+ <label>{{svg "octicon-code"}} {{.locale.Tr "packages.container.digest"}}</label>
+ <div class="markup"><pre class="code-block"><code>{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}</code></pre></div>
+ </div>
+ <div class="field">
<label>{{.locale.Tr "packages.container.documentation" | Safe}}</label>
</div>
</div>