You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60Lines changed: 60 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,10 @@ For details of the `workflow_dispatch` even see [this blog post introducing this
86
86
87
87
## Outputs
88
88
89
+
### `workflow-id`
90
+
91
+
> The ID of the worflow run that has been triggered.
92
+
89
93
### `workflow-url`
90
94
91
95
> The URL of the workflow run that has been triggered. It may be undefined if the URL couldn't be retrieved (timeout reached) or if `wait-for-completion` and `display-workflow-run-url` are > both `false`
@@ -95,6 +99,36 @@ For details of the `workflow_dispatch` even see [this blog post introducing this
95
99
> The result of the triggered workflow. May be one of `success`, `failure`, `cancelled`, `timed_out`, `skipped`, `neutral`, `action_required`. The step in your workflow will fail if the triggered workflow completes with `failure`, `cancelled` or `timed_out`. Other workflow conlusion are considered success.
96
100
> Only available if `wait-for-completion` is `true`
97
101
102
+
### `workflow-logs`
103
+
104
+
> The logs of the triggered workflow based if `inputs.workflow-logs` is set to either `output`, or `json-output`.
105
+
> Based on the value, result will be:
106
+
>
107
+
> *`output`: Multiline string
108
+
>
109
+
> ```log
110
+
> <job-name> | <datetime> <message>
111
+
> <job-name> | <datetime> <message>
112
+
> ...
113
+
> ```
114
+
>
115
+
> * `json-output`: JSON string
116
+
>
117
+
> ```json
118
+
> {
119
+
> "<job-name>": [
120
+
> {
121
+
> "datetime": "<datetime>",
122
+
> "message": "<message>"
123
+
> },
124
+
> {
125
+
> "datetime": "<datetime>",
126
+
> "message": "<message>"
127
+
> }
128
+
> ]
129
+
> }
130
+
> ```
131
+
98
132
## Example usage
99
133
100
134
### Invoke workflow without inputs. Wait for result
@@ -155,6 +189,32 @@ For details of the `workflow_dispatch` even see [this blog post introducing this
Copy file name to clipboardExpand all lines: action.yaml
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@ name: 'Workflow Dispatch and wait'
2
2
description: 'Trigger and chain GitHub Actions workflows with workflow_dispatch events and wait for result'
3
3
4
4
inputs:
5
-
workflow:
5
+
workflow:
6
6
description: 'Name or ID of workflow to run'
7
7
required: true
8
-
token:
8
+
token:
9
9
description: 'GitHub token with repo write access, can NOT use secrets.GITHUB_TOKEN, see readme'
10
10
required: true
11
11
inputs:
@@ -37,18 +37,36 @@ inputs:
37
37
required: false
38
38
default: true
39
39
wait-for-completion-timeout:
40
-
description: 'Maximum amount of time (+unit) to wait to mark workflow as timed out'
40
+
description: 'Maximum amount of time (+unit) to wait to mark workflow as timed out'
41
41
required: false
42
42
default: 1h
43
43
wait-for-completion-interval:
44
44
description: 'Time to wait (+unit) between two polls to get run status'
45
45
required: false
46
46
default: 1m
47
47
workflow-logs:
48
-
description: 'Indicate what to do with logs of the triggered workflow. `ignore` do not retrieve logs from tiggered workflow. `print` retrieves logs from triggered workflow and print in the workflow that triggered the other workflow.'
48
+
description: >-
49
+
Indicate what to do with logs of the triggered workflow.
50
+
`ignore` do not retrieve logs from tiggered workflow.
51
+
`print` retrieves logs from triggered workflow and print in the workflow that triggered the other workflow.
52
+
`output` retrieves logs from triggered workflow and set them as `workflow-logs` output.
53
+
`json-output` retrieves logs from triggered workflow and return a json array groupped by job name.
49
54
required: false
50
55
default: ignore
51
56
57
+
outputs:
58
+
workflow-conclusion:
59
+
description: 'Conclusion of the triggered workflow'
60
+
workflow-id:
61
+
description: 'ID of the triggered workflow'
62
+
workflow-url:
63
+
description: 'URL of the triggered workflow'
64
+
workflow-logs:
65
+
description: |
66
+
Logs of the triggered workflow. Based on `inputs.workflow-logs`, format is set to:
0 commit comments