集成无法访问资源-repository_dispatch失败

问题描述 投票:0回答:1

我有一个工作流程,将在完成时触发其他回购工作流程。我的问题是,下面的 yaml 在 Github Actions 上运行时,总是会导致

resource not accessible by integration

我已经尝试在两个存储库的 Github 上设置

Read and write permissions
,但仍然失败。我不确定问题是什么,因为我遵循了使用指南。非常感谢您的帮助。

dispatch:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Trigger event dispatch
        uses: peter-evans/repository-dispatch@v3
        with:
          repository: your-repo/your-repo.github.io
          event-type: trigger-download
github-actions
1个回答
0
投票

该问题可能是由于身份验证造成的。确保使用具有足够权限的个人访问令牌 (PAT)。在您的

steps
中,为两个存储库添加
GITHUB_TOKEN
或 PAT,其范围为
workflow

以下是yaml文件: 和: 令牌:${{secrets.GITHUB_TOKEN}}

确保两个存储库都在存储库设置下为此令牌启用了工作流权限。

© www.soinside.com 2019 - 2024. All rights reserved.