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
+36-30Lines changed: 36 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,44 +10,50 @@ wait for all `workflow_run` required workflows to be successful
10
10
11
11
<details>
12
12
<summary><strong>Why?</strong></summary>
13
-
14
-
The [`workflow_run`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run) event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow.
15
13
16
-
###### example
17
-
```yaml
18
-
on:
19
-
workflow_run:
20
-
workflows: [ test ]
21
-
types:
22
-
- completed
23
-
```
14
+
The [`workflow_run`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run) event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow.
15
+
16
+
###### example
17
+
18
+
```yaml
19
+
on:
20
+
workflow_run:
21
+
workflows: [ test ]
22
+
types:
23
+
- completed
24
+
```
25
+
26
+
However by itself, this doesn't quite work as expected.
27
+
28
+
1. The `completed` type, does not indicate success, for that you'd have to include the following in each job of your workflow:
2. If you're depending on more than one workflow, then ANY of them completing, will trigger the event
33
-
###### example
34
-
```yaml
35
-
name: deploy
48
+
> *if your `test` workflow fails, but `lint` completed successfully, `github.event.workflow_run.conclusion == 'success'` will still be true*
36
49
37
-
on:
38
-
workflow_run:
39
-
workflows: [ test, lint, compile ]
40
-
types:
41
-
- completed
42
-
```
43
-
> _if your `test` workflow fails, but `lint` completed successfully, `github.event.workflow_run.conclusion == 'success'` will still be true_
50
+
3. Your workflow will trigger as many times as you have workflow dependencies
44
51
45
-
3. Your workflow will trigger as many times as you have workflow dependencies
46
-
> _in the previous example, our `deploy` workflow, will run 3 times!_
52
+
> *in the previous example, our `deploy` workflow, will run 3 times!*
47
53
48
-
All this makes the `workflow_run` event fundamentally broken for any advanced usage, this Action aims to remedy that.
54
+
All this makes the `workflow_run` event fundamentally broken for any advanced usage, this Action aims to remedy that.
49
55
50
-
> _**Note**: See this [Community discussion](https://github.community/t/workflow-run-completed-event-triggered-by-failed-workflow/128001/5) for more info on the topic_
56
+
> ***Note**: See this [Community discussion](https://github.community/t/workflow-run-completed-event-triggered-by-failed-workflow/128001/5) for more info on the topic*
Copy file name to clipboardExpand all lines: docs/README.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,46 @@
1
+
<details>
2
+
<summary><strong>Why?</strong></summary>
3
+
4
+
The [`workflow_run`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run) event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow.
5
+
6
+
###### example
7
+
```yaml
8
+
on:
9
+
workflow_run:
10
+
workflows: [ test ]
11
+
types:
12
+
- completed
13
+
```
14
+
15
+
However by itself, this doesn't quite work as expected.
16
+
17
+
1. The `completed` type, does not indicate success, for that you'd have to include the following in each job of your workflow:
2. If you're depending on more than one workflow, then ANY of them completing, will trigger the event
23
+
###### example
24
+
```yaml
25
+
name: deploy
26
+
27
+
on:
28
+
workflow_run:
29
+
workflows: [ test, lint, compile ]
30
+
types:
31
+
- completed
32
+
```
33
+
> _if your `test` workflow fails, but `lint` completed successfully, `github.event.workflow_run.conclusion == 'success'` will still be true_
34
+
35
+
3. Your workflow will trigger as many times as you have workflow dependencies
36
+
> _in the previous example, our `deploy` workflow, will run 3 times!_
37
+
38
+
All this makes the `workflow_run` event fundamentally broken for any advanced usage, this Action aims to remedy that.
39
+
40
+
> _**Note**: See this [Community discussion](https://github.community/t/workflow-run-completed-event-triggered-by-failed-workflow/128001/5) for more info on the topic_
0 commit comments