apphost.source.inspect
Inspect a public GitHub repository for AppHost source launch. Dockerfile wins; otherwise package.json with scripts.start. Private repos and git hosts other than GitHub are rejected.
Read a public GitHub tree and decide Dockerfile vs package.json.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-apphost |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
git_url | string | Yes | — | Public GitHub URL (https://github.com/owner/repo) |
ref | string | No | — | Branch, tag, or SHA. Default is the repository default branch |
dockerfile | string | No | — | Dockerfile path relative to context_dir (default Dockerfile) |
context_dir | string | No | — | Build context directory inside the repo (default repo root) |
port | integer | No | 8080 | Listen port used when synthesizing a Node Dockerfile |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
git_url | string | No | — | — |
provider | string | Yes | — | — |
owner | string | Yes | — | — |
repo | string | Yes | — | — |
ref | string | Yes | — | — |
sha | string | Yes | — | — |
clone_url | string | Yes | — | — |
source_location | string | Yes | — | — |
strategy | string | Yes | — | — |
has_dockerfile | boolean | Yes | — | — |
has_package_json | boolean | Yes | — | — |
dockerfile | string | No | — | — |
context_dir | string | No | — | — |
generated_dockerfile | string | No | — | — |
start_script | string | No | — | — |
port | integer | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Will inspect the git URL |
completed | No | Yes | Yes | — | Source classified |
failed | No | Yes | No | — | Inspect rejected |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
inspected | SUCCESS | Source classified for image build | strategy, sha, clone_url |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.source.inspect",
"initial_data": {
"git_url": "value"
}
}