我正在使用 gitlab 8.1.4。并使用内置的 gitlab-ci。默认情况下,gitlab-ci 会为每次推送触发构建。如何让它只在创建合并请求时触发?
提前致谢
最佳答案
在您的 .gitlab-ci.yml 文件中尝试以下操作。
stage: build
script:
- xxxxx
artifacts:
paths:
- xxxxx
tags:
- xxxx
only:
- merge_requests
来源:https://docs.gitlab.com/ee/ci/yaml/#only-and-except-simplified
https://stackoverflow.com/questions/33910265/