简体   繁体   English

从分叉仓库拉取请求时无法触发 GitHub 操作

[英]Cannot trigger GitHub Actions while pull request from a fork repo

There is a private repo and have a GitHub Actions.有一个私人仓库并有一个 GitHub 操作。 If I make pull request between branches in this repo, GitHub Actions triggered correctly.如果我在此 repo 中的分支之间发出拉取请求,则 GitHub 操作会正确触发。

name: CI

on:
  pull_request:
    branches:
      - pre-production
      - production

jobs:
  build:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 2
...

Another developer who only has read premission fork this repo, make some commits, then pull request to the Upstream .另一个只读过 premission fork 这个 repo 的开发者,进行一些提交,然后将请求拉到Upstream The GitHub Actions doesn't been trigger.未触发 GitHub 操作。 I have confirmed that he pull request to the correct branch.我已经确认他将请求拉到正确的分支。

Is there any setting let other developer who only has read premission trigger the action in Upstream ?是否有任何设置让其他只有读取权限的开发人员触发Upstream中的操作?


Updated:更新:

There is a option in repo settings called " Run workflows from fork pull requests " but I cannot enable it.回购设置中有一个名为“ 从分叉拉取请求运行工作流”的选项,但我无法启用它。

Finally, I found a setting called " Run workflows from fork pull requests ".最后,我找到了一个名为“ Run workflows from fork pull requests ”的设置。 Enable it will solve the problem.启用它将解决问题。

If the repo is under an organization, we should enabled it in the organization setting.如果 repo 在组织下,我们应该在组织设置中启用它。 After that, we can enable it in the repo setting.之后,我们可以在 repo 设置中启用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM