從
使用 Github API
在 Github 官方檔案上,有一個服務來創建作業流調度事件
這是一個卷曲示例:
curl \
-X POST \
-H "Accept: application/vnd.github.v3 json" \
https://api.github.com/repos/octocat/hello-world/actions/workflows/42/dispatches \
-d '{"ref":"main"}'
請注意,您也可以inputs通過此 API發送作業流。
您還可以在本文中找到更多關于此的參考資料。
還有另一個Github API 服務來觸發repository_dispatch 事件。
獎金
如果您正在尋找通過終端命令列觸發這些workflow_dispatch事件(和repository_dispatch事件),您可以在 Python 中使用此自動化。實作可以在這個類中找到。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/369966.html
