Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Commit d80a643

Browse files
committed
chore: give an example how a dispatch event looks like
CU-86c0wr66k
1 parent 12f3475 commit d80a643

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

docs/meshstack.github.pipeline-automation.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,84 @@ To make a GitHub Action Workflow trigger available in the marketplace, create a
4545
- Choose **Pipeline Automation** in the **Implementation Type** dropdown.
4646
- Ensure you configure any necessary input fields to support the automation.
4747

48+
The dispatch event meshStack sends to GitHub in order to trigger the workflow will look like this:
49+
50+
```json
51+
{
52+
"ref": "<ref>",
53+
"inputs": {
54+
"buildingBlockRun": "<encodedRun>"
55+
}
56+
}
57+
```
58+
59+
The value for `<ref>` is the Git reference specified in the configuration, e.g. the branch name or a commit hash.\
60+
The value for `<encodedRun>` is a Base64 encoded version of a building block run object.\
61+
Please consider the following example for a run:
62+
63+
```json
64+
{
65+
"kind": "meshBuildingBlockRun",
66+
"apiVersion": "v1",
67+
"metadata": {
68+
"uuid": "19fe93f0-36d0-4019-9453-7f6f4ce490b4"
69+
},
70+
"spec": {
71+
"runNumber": 7,
72+
"buildingBlock": {
73+
"uuid": "3f7ee35a-a1d0-43d1-8ca7-dedbf9fd44b6",
74+
"spec": {
75+
"displayName": "name-of-buildingBlock",
76+
"workspaceIdentifier": "workspace-identifier",
77+
"projectIdentifier": "project-identifier",
78+
"fullPlatformIdentifier": "full-tenant-identifier",
79+
"inputs": [
80+
{
81+
"key": "input-key",
82+
"value": "test",
83+
"type": "STRING",
84+
"isSensitive": false,
85+
"isEnvironment": false
86+
}
87+
],
88+
"parentBuildingBlocks": []
89+
}
90+
},
91+
"buildingBlockDefinition": {
92+
"uuid": "4334947b-f48f-4cf2-bb75-0f24b2ada6e0",
93+
"spec": {
94+
"version": 6,
95+
"implementation": {
96+
"type": "GITHUB_WORKFLOW"
97+
}
98+
}
99+
},
100+
"behavior": "APPLY"
101+
},
102+
"status": "IN_PROGRESS",
103+
"_links": {
104+
"registerSource": {
105+
"href": "https://federation.dev.meshcloud.io/api/meshobjects/meshbuildingblockruns/19fe93f0-36d0-4019-9453-7f6f4ce490b4/status/source"
106+
},
107+
"updateSource": {
108+
"href": "https://federation.dev.meshcloud.io/api/meshobjects/meshbuildingblockruns/19fe93f0-36d0-4019-9453-7f6f4ce490b4/status/source/{sourceId}"
109+
},
110+
"meshstackBaseUrl": {
111+
"href": "https://federation.dev.meshcloud.io"
112+
}
113+
}
114+
}
115+
```
116+
117+
The GitHub workflow needs to specify exactly one input like this:
118+
119+
```yaml
120+
on:
121+
workflow_dispatch:
122+
inputs:
123+
buildingBlockRun:
124+
description: "Building Block Run Object"
125+
required: true
126+
```
127+
48128
This setup allows application teams to quickly and efficiently access automation workflows from the marketplace, enhancing their productivity and reducing the need for Git expertise.

0 commit comments

Comments
 (0)