英文:
How to trigger the committed units in GitHub Actions?
问题
如果.mdl和.tpt文件已提交到代码库,特定的单元还有一个批处理文件需要触发。有人知道如何解决这个问题吗?
路径:
src/model/units/.mdl
tests/Impl/Unittest/units/.tpt
tests/Impl/Unittest/units/.bat
我需要脚本,来解决这个问题以及要做什么。
英文:
If .mdl and .tpt files are committed to the repository, a specific unit has a batch file also that needs to be triggered. Does anyone know how to resolve this issue?
Paths:
src/model/units/.mdl
tests/Impl/Unittest/units/.tpt
tests/Impl/Unittest/units/.bat
I need script, how to do and what to do for this issue.
答案1
得分: 1
根据官方文档的说明,您可以使用paths
语法来实现您想要的效果:
on:
push:
paths:
- '**.mdl'
- '**.tpt'
- '**.bat'
这个工作流将在每次将.mdl
、.tpt
或.bat
文件推送到存储库时触发(适用于任何分支)。
请注意,这个实现也可以用于pull_request
事件。
英文:
As explained in the official documentation, you could use the paths
syntax to achieve what you want:
on:
push:
paths:
- '**.mdl'
- '**.tpt'
- '**.bat'
This workflow will trigger every time a .mdl
, .tpt
or .bat
file is pushed to the repository (for any branch).
Note that this implementation could also work with pull_request
events.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论