Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以将管道限制为类似于 gitlab-ci "only: [tags]" 的标记提交?
UI 只允许选项“链管道”或在 git push 上启动它。
管道由 git 钩子触发。您可以通过工作流 UI 将挂钩分配给管道。钩子只是一个简单的脚本,如果要进行构建,则返回 0,如果不应该发生,则返回任何其他值。因此,您可以检查提交是否像这样标记:
[ `git tag -l --points-at HEAD` | grep "YourTagsRegex" ] && exit 0 exit 1
请注意,我没有对此进行测试。希望这很接近。