From e10cfd8fcc395360ce9acd93bfd7503da8e35381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 22 Feb 2019 11:54:41 +0100 Subject: [PATCH] gitlab-ci: Only run docker-image stage if relevant source files change Otherwise there's normally no need to run it. It will also run when a new branch is created, which ensures that the docker image always exists (e.g. in a newly forked repository). Inspired by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/143 (Cherry picked from commit 8694395fcfd407190db74f31064960e484747377) --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6d1ef5ff..d2ce64531 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,10 @@ stages: debian-testing: stage: docker-image + only: + changes: + - .gitlab-ci.yml + - .gitlab-ci/Dockerfile image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""]