仅在当前COMM包含对某些文件的更改时,如何触发Gitlab CI?
我有一个gitlab阶段,我只想在某些文件更改时运行。我尝试使用仅使用
和> IF:更改...
,但是那些不按照我想要的工作。
我希望只有当当前提交(无论是合并请求还是被推到MAIN)时,才会触发此阶段
。
cache frontend:
stage: cache
cache: &frontend_cache
key: frontend-packages
paths:
- frontend/node_modules/
- frontend/.yarn/
script:
- cd frontend
- yarn install --immutable
only:
changes:
- frontend/yarn.lock
I a have a Gitlab stage that I only want to run if there are changes to some file. I have tried using only
and if: changes...
however those not work as I want.
I want that this stage is only triggered if the current commit (no matter if it is a merge request or pushed to main) contains changes to some file
My stage:
cache frontend:
stage: cache
cache: &frontend_cache
key: frontend-packages
paths:
- frontend/node_modules/
- frontend/.yarn/
script:
- cd frontend
- yarn install --immutable
only:
changes:
- frontend/yarn.lock
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论