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
This commit is contained in:
Michel Dänzer 2019-02-07 17:35:13 +01:00 committed by Michel Dänzer
parent 8f8d358bad
commit 8694395fcf
1 changed files with 4 additions and 0 deletions

View File

@ -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: [""]