actionsGenerateRunnerJitconfigForRepo
Create configuration for a just-in-time runner for a repository
Details
- Method:
POST - Path:
/repos/{owner}/{repo}/actions/runners/generate-jitconfig - Operation ID:
actions/generate-runner-jitconfig-for-repo
Parameters
{
"owner": {
"description": "The account owner of the repository. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"repo": {
"description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"name": {
"description": "The name of the new runner.",
"required": true,
"location": "body",
"type": "string"
},
"runner_group_id": {
"description": "The ID of the runner group to register the runner to.",
"required": true,
"location": "body",
"type": "integer"
},
"labels": {
"description": "The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100.",
"required": true,
"location": "body",
"type": "array"
},
"work_folder": {
"description": "The working directory to be used for job execution, relative to the runner install directory.",
"required": false,
"location": "body",
"type": "string"
}
}Response Schema
{
"type": "object",
"required": [
"runner",
"encoded_jit_config"
],
"properties": {
"runner": {
"title": "Self hosted runners",
"description": "A self hosted runner",
"type": "object",
"properties": {
"id": {
"description": "The ID of the runner.",
"type": "integer",
"example": 5
},
"runner_group_id": {
"description": "The ID of the runner group.",
"type": "integer",
"example": 1
},
"name": {
"description": "The name of the runner.",
"type": "string",
"example": "iMac"
},
"os": {
"description": "The Operating System of the runner.",
"type": "string",
"example": "macos"
},
"status": {
"description": "The status of the runner.",
"type": "string",
"example": "online"
},
"busy": {
"type": "boolean"
},
"labels": {
"type": "array",
"items": {
"title": "Self hosted runner label",
"description": "A label for a self hosted runner",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the label."
},
"name": {
"type": "string",
"description": "Name of the label."
},
"type": {
"type": "string",
"description": "The type of label. Read-only labels are applied automatically when the runner is configured.",
"enum": [
"read-only",
"custom"
]
}
},
"required": [
"name"
]
}
},
"ephemeral": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"os",
"status",
"busy",
"labels"
]
},
"encoded_jit_config": {
"type": "string",
"description": "The base64 encoded runner configuration."
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('actionsGenerateRunnerJitconfigForRepo', {
# Add required parameters here
})