16
16
strategy :
17
17
matrix :
18
18
os : [ubuntu-latest] # , macos-latest]
19
+ outputs :
20
+ trigger_signal : ${{ steps.trigger_signal.conclusion }}
19
21
steps :
20
22
- uses : actions/checkout@v2
21
23
@@ -61,20 +63,32 @@ jobs:
61
63
path : ${{ github.workspace }}/whalelint-${{ github.sha }}
62
64
retention-days : 7
63
65
66
+ - name : Need to trigger workflows
67
+ id : trigger_signal
68
+ if : |
69
+ (
70
+ github.event_name == 'push' &&
71
+ github.ref == 'refs/heads/main'
72
+ ) ||
73
+ (
74
+ github.event_name == 'pull_request' &&
75
+ github.base_ref == 'main' &&
76
+ github.event.pull_request.head.repo.full_name == github.repository &&
77
+ !startsWith(github.actor, 'dependabot')
78
+ )
79
+ run : echo "Need to trigger further workflows"
80
+
81
+ debug :
82
+ name : debug
83
+ needs : build_and_test
84
+ runs-on : ubuntu-latest
85
+ steps :
86
+ - run : echo ${{ needs.build_and_test.outputs.trigger_signal }}
87
+
64
88
vscode :
65
89
name : vscode-trigger
66
90
needs : build_and_test
67
- if : |
68
- (
69
- github.event_name == 'push' &&
70
- github.ref == 'refs/heads/main'
71
- ) ||
72
- (
73
- github.event_name == 'pull_request' &&
74
- github.base_ref == 'main' &&
75
- github.event.pull_request.head.repo.full_name == github.repository &&
76
- !startsWith(github.actor, 'dependabot')
77
- )
91
+ if : needs.build_and_test.outputs.trigger_signal == 'success'
78
92
runs-on : ubuntu-latest
79
93
steps :
80
94
- name : Dump context
@@ -98,17 +112,7 @@ jobs:
98
112
jetbrains :
99
113
name : jetbrains-trigger
100
114
needs : build_and_test
101
- if : |
102
- (
103
- github.event_name == 'push' &&
104
- github.ref == 'refs/heads/main'
105
- ) ||
106
- (
107
- github.event_name == 'pull_request' &&
108
- github.base_ref == 'main' &&
109
- github.event.pull_request.head.repo.full_name == github.repository &&
110
- !startsWith(github.actor, 'dependabot')
111
- )
115
+ if : needs.build_and_test.outputs.trigger_signal == 'success'
112
116
runs-on : ubuntu-latest
113
117
steps :
114
118
- name : Trigger JetBrains plugin build workflow
0 commit comments