【发布时间】:2021-10-08 03:40:08
【问题描述】:
我正在尝试触发 GitHub 操作工作流,该工作流位于我的组织存储库中,我是组织的所有者
我正在尝试使用以下 POST 请求触发
curl -H "Accept: application/vnd.github+json" -H "Authorization: token " --request POST --data '{"event_type": "do-something"}' https://api.github.com/repos/USER/REPO/dispatches
但我收到以下消息
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event"
}
我的工作流程
name: Node.js CI
on:
repository_dispatch:
schedule:
- cron: '5 12 * * 0'
jobs:
build:
runs-on: ubuntu-latest
我认为因为它不在我的帐户中,而是在组织帐户中,这就是它可能给出此错误的原因。 任何解决方法都会有所帮助。
【问题讨论】:
-
如果repo在组织下,URL不应该包括ORGANISATION/REPO而不是USER/REPO吗?
标签: github github-actions dispatch