From cbf0b456a829784efa97b22ef65704283b63e92b Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Wed, 28 Feb 2024 23:04:26 +0100
Subject: [PATCH] ci(earthly): Add latest as arg to be passed down

---
 Earthfile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Earthfile b/Earthfile
index 2451ddaea..ecf548d0a 100644
--- a/Earthfile
+++ b/Earthfile
@@ -3,7 +3,8 @@ VERSION --wait-block 0.7
 # images builds all container images in the Repository
 images:
     ARG CONTAINER_REGISTRY=quay.io/shivering-isles
-    BUILD +images-earthly --CONTAINER_REGISTRY=${CONTAINER_REGISTRY}
+    ARG latest=false
+    BUILD +images-earthly --CONTAINER_REGISTRY=${CONTAINER_REGISTRY} --latest=$latest
 
 images-src:
     FROM quay.io/fedora/fedora:39
@@ -12,8 +13,9 @@ images-src:
 images-earthly:
     FROM +images-src
     ARG CONTAINER_REGISTRY=quay.io/shivering-isles
+    ARG latest=false
     FOR dir IN $(find ./images -type d -execdir test -f {}/Earthfile -a \! -e {}/.skip-earthly \; -print)
-        BUILD "${dir}+container" --registry="$CONTAINER_REGISTRY/$(basename ${dir})"
+        BUILD "${dir}+container" --registry="$CONTAINER_REGISTRY/$(basename ${dir})" --latest=$latest
     END
 
 # changelog generates a local RELEASENOTES.md file using git-chglog
-- 
GitLab