Run CI tasks only when actual code is changed

This commit is contained in:
SinTan1729 2022-11-05 14:49:05 -05:00
parent 946afbf726
commit 79e01a4145

View File

@ -12,6 +12,16 @@ docker-build-main:
- docker push "$CI_REGISTRY_IMAGE" - docker push "$CI_REGISTRY_IMAGE"
only: only:
- main - main
changes:
- bin/*
- gradle/*
- src/*
- build.gradle
- DockerFile
- gradlew
- gradlew.bat
- settings.gradle
- .gitlab.ci.yml
docker-build: docker-build:
# Official docker image. # Official docker image.
@ -26,3 +36,13 @@ docker-build:
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except: except:
- main - main
changes:
- bin/*
- gradle/*
- src/*
- build.gradle
- DockerFile
- gradlew
- gradlew.bat
- settings.gradle
- .gitlab.ci.yml