github动作工作流程在推送上触发而不是发行创建

发布于 2025-02-06 21:58:20 字数 735 浏览 0 评论 0原文

我有一个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紫﹏色ふ单纯 2025-02-13 21:58:20

事实证明,操作中的字段标记为是单个字符串,而不是字符串列表(这是我拥有此工作流的多个存储库之间的略有区别)。我不确定为什么失败模式是在与指定事件的一组事件集上运行工作流程。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文