Use the run-cloudbees-workflow GitHub Action in a GHA workflow to trigger a CloudBees Unify workflow.
This action is available on the GitHub Marketplace.
Inputs
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
Yes |
The CloudBees Unify personal access token. |
|
String |
Yes |
The filename of the CloudBees Unify workflow YAML file to be run. |
|
String |
No |
The CloudBees Unify URL.
The default value is |
|
String |
No |
|
|
String |
No |
The repository code branch of the CloudBees Unify workflow to be run. The default is the same branch as the triggering GHA workflow. |
|
JSON |
No |
Input parameters required to run the CloudBees Unify workflow, formatted as JSON data in key/value pairs. |
[1] To find the multi-hexadecimal component UUID:
-
Navigate to the component in CloudBees Unify.
-
Locate the ID value in the URL after
componentId=.
Output
| Output name | Data type | Description |
|---|---|---|
|
String |
The CloudBees Unify URL of the triggered CloudBees workflow run. |
Usage examples
The following is a basic example of using the action:
steps: - name: Run CloudBees workflow uses: cloudbees-io-gha/run-cloudbees-workflow@v1 with: cloudbees-pat: ${{ secrets.MY_PAT }} workflow-file-name: "workflow.yaml"
The following example specifies the component ID and branch name:
steps: - name: Run CloudBees workflow main branch uses: cloudbees-io-gha/run-cloudbees-workflow@v1 with: cloudbees-pat: ${{ secrets.MY_PAT }} workflow-file-name: "workflow.yaml" component-id: "1234abcd-56ef-78gh-90ij-123456klmnop" branch-name: "main"
The following example specifies input parameters:
steps: - name: Run CloudBees workflow main branch uses: cloudbees-io-gha/run-cloudbees-workflow@v1 with: cloudbees-pat: ${{ secrets.MY_PAT }} workflow-file-name: "workflow.yaml" workflow-inputs: '{"workflowInput1": "test1","workflowInput2": "test2"}'