I noticed that when I create a new branch, Gitlab-CI is triggered to run the job. How do I disable this in .gitlab-ci.yml?
I noticed that when I create a new branch, Gitlab-CI is triggered to run the job. How do I disable this in .gitlab-ci.yml?
Try
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
when: never
or use the outlined if: condition in any number of jobs you do not want to have started on branch creation. Note, however, that this condition also (to my understanding) suppresses pipelines if you make any commits via WebIDE. If you insist on having those, you'll probably have to check for $CI_PIPELINE_SOURCE == "web" && $CI_PIPELINE_SOURCE != "webide" (but I have not tested if that works).
You need to configure your pipeline do not run on branches
except:
- branches
put this in each step of your pipeline