github动作工作流程在推送上触发而不是发行创建
我有一个GitHub工作流程,该工作流程应在创建或标记时与问题相互作用。这可以在我添加的大约一半的存储库中起作用,在另一半上,它在每次推动下运行(并且失败),但在创建或标记时不会运行。可能出了什么问题?是否有一个很好的方法来调试在不同的GitHub事件上触发哪些工作流程?
配置如下,在每个仓库中完全相同:
name: issue_board
on:
issues:
types:
- opened
- labeled
jobs:
add-to-project:
name: Add an issue to a board
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: [redacted]
github-token: [redacted]
labeled: "Type: Enhancement", "Type: Bug"
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: [redacted]
github-token: [redacted]
labeled: "Type: Documentation"
I have a github workflow that is supposed to interact with issues when they are created or labeled. This works on about half of the repos where I added it and on the other half, it runs (and fails) on every push but does not run when issues are created or labeled. What could be going wrong? Is there a good way to debug which workflows are triggered on different github events?
The config is as follows and is exactly the same in each repo:
name: issue_board
on:
issues:
types:
- opened
- labeled
jobs:
add-to-project:
name: Add an issue to a board
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: [redacted]
github-token: [redacted]
labeled: "Type: Enhancement", "Type: Bug"
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: [redacted]
github-token: [redacted]
labeled: "Type: Documentation"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,操作中的字段
标记为
是单个字符串,而不是字符串列表(这是我拥有此工作流的多个存储库之间的略有区别)。我不确定为什么失败模式是在与指定事件的一组事件集上运行工作流程。It turned out that the field
labeled
in the action was a single string, not a list of strings (this was a slight difference between the multiple repos where I had this workflow). I'm not sure why the failure mode was to run the workflow on a different set of events than the ones specified.