我對 GitHub 作業流程/操作還很陌生,我的任務是獲取我們當前與跑步者匹配的跑步者串列。我正在查看現有作業流程的宣告。
runs-on: ["self-hosted", "management-control-plane", "${{ needs.env.outputs.env }}"]
所以它看起來像是在說'在指定的環境中找到一個我們現有的具有指定標簽'管理控制平面'的VM。因此,Github 作為其參考的這些地方的串列。
問題:如何使用標簽和環境查詢虛擬機串列?謝謝!
uj5u.com熱心網友回復:
您可以使用 REST API 列出組織或存盤庫的所有運行程式。
這是檔案中的示例:
curl \
-H "Accept: application/vnd.github.v3 json" \
https://api.github.com/orgs/ORG/actions/runners
{
"total_count": 2,
"runners": [
{
"id": 23,
"name": "linux_runner",
"os": "linux",
"status": "online",
"busy": true,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
// etc...
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/362264.html
標籤:javascript 节点.js github github-actions
