|
| 1 | +# Register Source GitHub Action |
| 2 | + |
| 3 | +This GitHub Action registers sources to the meshStack Building Block pipeline workflow. It integrates with the meshStack API to update the status of a Building Block Run with the specified steps. |
| 4 | + |
| 5 | +### Overview |
| 6 | + |
| 7 | +The meshStack Building Block pipeline allows you to automate and manage complex workflows by defining a series of steps that need to be executed. Each Building Block Run represents an instance of such a workflow. This GitHub Action helps you register the source of the run and update its status with the specified steps. |
| 8 | + |
| 9 | +In order to return updates for a run to meshStack, you first need to register one or multiple steps and their resources of your run execution. It is up to you how many or how you organize your steps. You can, however, also just send step results back and the registration takes place on the fly. But in order to have a consistent display and ordering of steps, it is highly advised to pre-register steps and sources. |
| 10 | + |
| 11 | +For more details on the meshBuildingBlockRun API, refer to the [meshcloud API documentation](https://docs.meshcloud.io/api/index.html#mesh_buildingblockrun). |
| 12 | + |
| 13 | +For more information on integrating with the meshStack Building Block pipeline, refer to the [meshStack Building Block pipeline integration documentation](https://docs.meshcloud.io/docs/meshstack.building-pipeline-integration.html#building-block-run-and-steps). |
| 14 | + |
| 15 | + |
| 16 | +### Inputs |
| 17 | + |
| 18 | +- `base_url` (required): The base URL for the API. |
| 19 | +- `bb_run_uuid` (required): The Building Block Run UUID. |
| 20 | +- `steps` (required): The steps to register. |
| 21 | +- `token` (required): The API token for authentication. |
| 22 | + |
| 23 | +### Outputs |
| 24 | + |
| 25 | +- `response`: The response from the API. |
| 26 | + |
| 27 | +### Example Usage |
| 28 | + |
| 29 | +```yaml |
| 30 | +name: Register Source Example |
| 31 | +on: |
| 32 | + push: |
| 33 | + branches: |
| 34 | + - main |
| 35 | + |
| 36 | +jobs: |
| 37 | + register-source: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + |
| 40 | + steps: |
| 41 | + - name: Checkout repository |
| 42 | + uses: actions/checkout@v2 |
| 43 | + |
| 44 | + - name: Register Source |
| 45 | + |
| 46 | + with: |
| 47 | + base_url: 'https://api.example.com' |
| 48 | + bb_run_uuid: 'your-bb-run-uuid' |
| 49 | + token: ${{ secrets.API_TOKEN }} |
| 50 | + steps: | |
| 51 | + [ |
| 52 | + { "id": "terraform-validate", "displayName": "terraform validate" }, |
| 53 | + { "id": "terraform-plan", "displayName": "terraform plan" }, |
| 54 | + { "id": "terraform-apply", "displayName": "terraform apply" } |
| 55 | + ] |
| 56 | +``` |
0 commit comments