GitHub Actions - 忽略或排除 Dependabot Pull 请求
我在其中有一个带有 disterabot 的存储库,它在我想保留的版本更新等上打开PR。
在同一存储库中,我有一个github诉讼,用于拉动请求供我的团队使用。
我的问题是,无论我尝试什么,依赖关系都会继续触发拉动请求操作。
我的公关操作必须在登台分支拉力请求时触发,因此
name: Pull Request
on:
pull_request:
branches:
- staging
我不能在plul_reuqest和branches_ignore上同时使用 - 如文档
没有使用过的工作流
name: Pull Request
on:
pull_request:
branches:
- staging
- '!dependabot/**'
name: Pull Request
on:
pull_request:
branches:
- staging
jobs:
Build:
if: github.actor!= 'dependabot-preview[bot]'
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
我已经尝试过的工作流量尝试我还 尝试像这样的Displyabot用户
if: github.actor!= 'depbot'
会喜欢您如何处理此问题的一些见解或答案。
谢谢!
I have a repository with Dependabot in it, that opens PR on version updates, etc which I would like to keep.
In the same repository, I have a GitHub Action for Pull Requests for my team to use.
My issue is that the Dependabot keeps triggering the Pull Request action no matter what I tried.
My PR action have to be triggered on staging branch pull requests, like so:
name: Pull Request
on:
pull_request:
branches:
- staging
So I can't use both on pull_reuqest AND branches_ignore - as stated in the documentation
Workflow attempts I have tried so far that unfortunately haven't worked:
name: Pull Request
on:
pull_request:
branches:
- staging
- '!dependabot/**'
name: Pull Request
on:
pull_request:
branches:
- staging
jobs:
Build:
if: github.actor!= 'dependabot-preview[bot]'
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
I have also tried excluding the Dependabot user like so:
if: github.actor!= 'depbot'
Would love some insights or answers on how you have dealt with this issue.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想多年来发生了许多变化,您可以在整个网络上找到过时的方式。实际方法是在依赖器文档中
请注意,如今您还可以检查
github.triggering_actor
- 如果您希望触发工作流程,请跳过工作流,但希望能够在Depplyabot打开的PR上手动触发它。I guess there were many changes over the years and you can find outdated ways all over the web. The actual way is documented in the Dependabot documentation
Note that nowadays you can also check the
github.triggering_actor
- if you want workflow to be skipped if Dependabot triggered it, but want to be able to manually trigger it on a PR that was opened by Dependabot.