From 79e01a414529adaa77db728660c3d5379d3a42df Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sat, 5 Nov 2022 14:49:05 -0500 Subject: [PATCH] Run CI tasks only when actual code is changed --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e24582..8d68399 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,16 @@ docker-build-main: - docker push "$CI_REGISTRY_IMAGE" only: - main + changes: + - bin/* + - gradle/* + - src/* + - build.gradle + - DockerFile + - gradlew + - gradlew.bat + - settings.gradle + - .gitlab.ci.yml docker-build: # Official docker image. @@ -26,3 +36,13 @@ docker-build: - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" except: - main + changes: + - bin/* + - gradle/* + - src/* + - build.gradle + - DockerFile + - gradlew + - gradlew.bat + - settings.gradle + - .gitlab.ci.yml \ No newline at end of file