From 09b771b2cff2e80bd0db6936498050fdde42edc6 Mon Sep 17 00:00:00 2001
From: Bastien Le Querrec <blq@laquadrature.net>
Date: Thu, 21 Mar 2024 00:36:09 +0100
Subject: [PATCH] =?UTF-8?q?ci:=20ne=20compile=20l'image=20docker=20qu'en?=
 =?UTF-8?q?=20cas=20de=20changement=20ou=20si=20forc=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ab33d04..c9bfb75 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,10 +23,12 @@ docker:
   - docker build -t ${IMAGE_NAME}:latest -f Dockerfile-base .
   - docker push ${IMAGE_NAME}:latest
   image: docker:20.10.17
-  allow_failure: true
-  only:
-    changes:
-      - Dockerfile-base
+  rules:
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+      changes:
+        paths:
+        - Dockerfile-base
+    - if: $COMPILE_DOCKER
 
 test_ppparis:
   stage: test
-- 
GitLab