dwa*_*rdu 6 github github-api github-actions building-github-actions
我一直在查看 GitHub REST API,并试图找出在哪里可以找到端点来获取操作中工作流程的状态。我判断它是否通过的唯一方法是下载badge.svg。
您可以使用工作流运行 api:
GET https://api.github.com/repos/[owner]/[repo]/actions/workflows/[workflowID]/runs
Run Code Online (Sandbox Code Playgroud)
[workflowID]也可以是文件名,在以下示例中ci.yml:
https://api.github.com/repos/bertrandmartel/tableau-scraping/actions/workflows/ci.yml/runs
curl然后你可以使用和进行第一次运行jq:
GET https://api.github.com/repos/[owner]/[repo]/actions/workflows/[workflowID]/runs
Run Code Online (Sandbox Code Playgroud)
输出:
completed
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2993 次 |
| 最近记录: |