From: Maria Matejka Date: Wed, 16 Apr 2025 18:36:17 +0000 (+0200) Subject: CI: Do not rebuild Docker images for test builds for new branches X-Git-Tag: v2.17.1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae25b5fd18803c0005498eea218a7188c2d005bc;p=thirdparty%2Fbird.git CI: Do not rebuild Docker images for test builds for new branches New branch considers all files changed. We don't want to rebuild all docker images for new branches; that's just a waste of time and energy. There is a better way for future -- a much better fine-grained control may be obtained by running secondary pipelines. fixes #212 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59afb1d97..58726a240 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,13 +44,19 @@ stages: # That's Docker in Docker - dind rules: - - if: '$CI_COMMIT_TAG' # Never rebuild for tags + - if: '$CI_COMMIT_TAG' when: never - - changes: + + # Never rebuild for new branches + - if: $CI_COMMIT_BEFORE_SHA == "0000000000000000000000000000000000000000" + when: never + # Do any change in Dockerfile (e.g. change a comment) to rebuild the image + - changes: - misc/docker/$IMG_NAME/Dockerfile when: always + - when: never docker-docbuilder: