spad.auto-deploy-release ​
Handles automatic deployments triggered by GitHub release webhooks
Handles automatic deployments triggered by GitHub release webhooks.
Input fields: repository_uuid, tag_name, action, release_id (optional), github_release_id (optional), prerelease (optional), target_commitish (optional), release_name (optional), organization_id (optional)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
tag_name | string | Yes | — | Released tag (e.g. v1.2.3) |
action | string | Yes | — | Release action — 'published' or 'released' |
site_uuid | string | No | — | SpadSite UUID (GitLab path); use either this or repository_uuid |
repository_uuid | string | No | — | GitHubRepository UUID (GitHub path) |
organization_uuid | string | No | — | Organization UUID; inferred from the repo when omitted |
release_uuid | string | No | — | Internal release UUID (GitHubRelease.uuid) for idempotency |
github_release_ref | string | No | — | GitHub Release id from the webhook payload (provider-native) |
prerelease | boolean | No | False | Whether the release is a prerelease |
target_commitish | string | No | — | Target commit/branch the tag was created from |
release_name | string | No | — | Human-friendly release name |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | No | — | Site UUID (GitLab path) |
repository_uuid | string | No | — | GitHub repository UUID (GitHub path) |
organization_uuid | string | No | — | Resolved organization UUID |
release_uuid | string | No | — | Internal release UUID propagated from input |
github_release_ref | string | No | — | GitHub release id propagated from input (provider-native) |
tag_name | string | No | — | Released tag |
action | string | No | — | Release action ('published' or 'released') |
prerelease | boolean | No | — | Whether the release is a prerelease |
target_commitish | string | No | — | Target commit/branch propagated from input |
release_name | string | No | — | Release name propagated from input |
webhook_source | string | No | — | 'github' or 'gitlab' |
matching_sites | list | No | — | Sites that matched the release and will be deployed |
skipped_sites | list | No | — | Sites that were skipped (action mismatch or prerelease excluded) |
triggered_count | integer | No | — | Number of deployments successfully queued |
deployments | list | No | — | Per-site deployment records (deployment_uuid, workflow_uuid, dispatch_workflow_uuid, site_uuid, site_name) |
trigger_errors | list | No | — | Per-site errors encountered while queuing deployments |
initiated_at | string | No | — | ISO8601 timestamp when the workflow was initiated |
sites_found_at | string | No | — | ISO8601 timestamp when find_sites completed |
triggered_at | string | No | — | ISO8601 timestamp when deployments were triggered (only when matching sites exist) |
completed_at | string | No | — | ISO8601 timestamp when the workflow reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the workflow reached FAILED |
failure_reason | string | No | — | Reason recorded on the failure path |
_children_by_key | dict | No | — | Child workflow ids keyed by 'dispatch:{site_uuid}' |
_sites_processed | dict | No | — | Idempotency map of sites already processed by action_trigger_deployments (keyed by site_uuid) |
children_aggregate | dict | No | — | Aggregate counts from the last all_children_terminal poll |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | find_sites | — |
finding_sites | No | No | — | trigger_deployments | — |
triggering | No | No | — | check_children | — |
waiting_for_children | No | No | — | — | Poll spawned dispatch workflows until all reach a terminal state |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | find_sites | finding_sites | — |
finding_sites | trigger_deployments | triggering | — |
triggering | check_children | waiting_for_children | — |
waiting_for_children | check_children | waiting_for_children | — |
waiting_for_children | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.auto-deploy-release",
"initial_data": {
"tag_name": "value",
"action": "value"
}
}