From dd309ca89492556ecdc230258871d72dd42f2a6c Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 24 Feb 2026 20:03:54 +0000 Subject: [PATCH] CI: also build apps whose images don't exist yet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handles first deploy — images aren't in the local registry yet, so they must be built even if the diff doesn't touch app dirs. --- .gitea/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e4161e3..a2e7462 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -59,7 +59,8 @@ jobs: fi for app in blog market cart events federation account; do - if [ \"\$REBUILD_ALL\" = true ] || echo \"\$CHANGED\" | grep -q \"^\$app/\"; then + IMAGE_EXISTS=\$(docker image ls -q ${{ env.REGISTRY }}/\$app:latest 2>/dev/null) + if [ \"\$REBUILD_ALL\" = true ] || echo \"\$CHANGED\" | grep -q \"^\$app/\" || [ -z \"\$IMAGE_EXISTS\" ]; then echo \"Building \$app...\" docker build \ --build-arg CACHEBUST=\$(date +%s) \