From 6505a78d7339d4beb2da0f3fbc0e3ef65e06adfa Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Sat, 28 Oct 2023 16:14:08 +0200
Subject: [PATCH] feat(cowsay): Add image metadata

---
 images/.utils/Earthfile | 5 +++--
 images/cowsay/Earthfile | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/images/.utils/Earthfile b/images/.utils/Earthfile
index 7ac1aac70..d7ec501c0 100644
--- a/images/.utils/Earthfile
+++ b/images/.utils/Earthfile
@@ -14,8 +14,9 @@ LABEL:
     ARG authors="Sheogorath"
     ARG source="https://git.shivering-isles.com/shivering-isles/infrastructure-gitops/-/tree/main/images/${image}"
     LABEL org.opencontainers.image.title="${image}"
-    LABEL org.opencontainers.image.source="${source}"
+    LABEL org.opencontainers.image.source="https://git.shivering-isles.com/shivering-isles/infrastructure-gitops/-/tree/main/images/${image}"
     LABEL org.opencontainers.image.url="https://git.shivering-isles.com/shivering-isles/infrastructure-gitops/-/tree/main/images/${image}"
     LABEL org.opencontainers.image.version="${version}"
     LABEL org.opencontainers.image.description="Container for ${image} by ${authors}"
-    LABEL org.opencontainers.image.authors="${authors}"
\ No newline at end of file
+    LABEL org.opencontainers.image.authors="${authors}"
+    LABEL sourcecode=${source}
\ No newline at end of file
diff --git a/images/cowsay/Earthfile b/images/cowsay/Earthfile
index c6035ecc6..1feb3538c 100644
--- a/images/cowsay/Earthfile
+++ b/images/cowsay/Earthfile
@@ -44,10 +44,12 @@ build:
 
 container-internal:
     FROM +distroless-perl
+    ARG branch
     COPY +build/cowsay /cowsay
 
     WORKDIR /workdir
     ENTRYPOINT [ "/cowsay" ]
+    DO ../.utils/+LABEL --image=cowsay --version=${branch} --source=https://github.com/cowsay-org/cowsay.git
 
 container:
     FROM ../mirror+golang
-- 
GitLab