File tree 5 files changed +134
-0
lines changed
5 files changed +134
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name: Check General Formatting
3
3
4
4
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
5
5
on :
6
+ create :
6
7
push :
7
8
pull_request :
8
9
schedule :
12
13
repository_dispatch :
13
14
14
15
jobs :
16
+ run-determination :
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ result : ${{ steps.determination.outputs.result }}
20
+ steps :
21
+ - name : Determine if the rest of the workflow should run
22
+ id : determination
23
+ run : |
24
+ RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
25
+ # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
26
+ if [[
27
+ "${{ github.event_name }}" != "create" ||
28
+ "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
29
+ ]]; then
30
+ # Run the other jobs.
31
+ RESULT="true"
32
+ else
33
+ # There is no need to run the other jobs.
34
+ RESULT="false"
35
+ fi
36
+
37
+ echo "result=$RESULT" >> $GITHUB_OUTPUT
38
+
15
39
check :
40
+ needs : run-determination
41
+ if : needs.run-determination.outputs.result == 'true'
16
42
runs-on : ubuntu-latest
17
43
18
44
steps :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name: Check npm
3
3
4
4
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5
5
on :
6
+ create :
6
7
push :
7
8
paths :
8
9
- " .github/workflows/check-npm-task.ya?ml"
@@ -27,8 +28,33 @@ permissions:
27
28
contents : read
28
29
29
30
jobs :
31
+ run-determination :
32
+ runs-on : ubuntu-latest
33
+ outputs :
34
+ result : ${{ steps.determination.outputs.result }}
35
+ steps :
36
+ - name : Determine if the rest of the workflow should run
37
+ id : determination
38
+ run : |
39
+ RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
40
+ # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
41
+ if [[
42
+ "${{ github.event_name }}" != "create" ||
43
+ "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
44
+ ]]; then
45
+ # Run the other jobs.
46
+ RESULT="true"
47
+ else
48
+ # There is no need to run the other jobs.
49
+ RESULT="false"
50
+ fi
51
+
52
+ echo "result=$RESULT" >> $GITHUB_OUTPUT
53
+
30
54
validate :
31
55
name : validate (${{ matrix.project.path }})
56
+ needs : run-determination
57
+ if : needs.run-determination.outputs.result == 'true'
32
58
runs-on : ubuntu-latest
33
59
34
60
strategy :
61
87
62
88
check-sync :
63
89
name : check-sync (${{ matrix.project.path }})
90
+ needs : run-determination
91
+ if : needs.run-determination.outputs.result == 'true'
64
92
runs-on : ubuntu-latest
65
93
66
94
strategy :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name: Check Prettier Formatting
3
3
4
4
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
5
5
on :
6
+ create :
6
7
push :
7
8
paths :
8
9
- " .github/workflows/check-prettier-formatting-task.ya?ml"
204
205
repository_dispatch :
205
206
206
207
jobs :
208
+ run-determination :
209
+ runs-on : ubuntu-latest
210
+ permissions : {}
211
+ outputs :
212
+ result : ${{ steps.determination.outputs.result }}
213
+ steps :
214
+ - name : Determine if the rest of the workflow should run
215
+ id : determination
216
+ run : |
217
+ RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
218
+ # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
219
+ if [[
220
+ "${{ github.event_name }}" != "create" ||
221
+ "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
222
+ ]]; then
223
+ # Run the other jobs.
224
+ RESULT="true"
225
+ else
226
+ # There is no need to run the other jobs.
227
+ RESULT="false"
228
+ fi
229
+
230
+ echo "result=$RESULT" >> $GITHUB_OUTPUT
231
+
207
232
check :
233
+ needs : run-determination
234
+ if : needs.run-determination.outputs.result == 'true'
208
235
runs-on : ubuntu-latest
209
236
210
237
steps :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name: Check Taskfiles
3
3
4
4
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
5
5
on :
6
+ create :
6
7
push :
7
8
paths :
8
9
- " .github/workflows/check-taskfiles.ya?ml"
26
27
repository_dispatch :
27
28
28
29
jobs :
30
+ run-determination :
31
+ runs-on : ubuntu-latest
32
+ outputs :
33
+ result : ${{ steps.determination.outputs.result }}
34
+ steps :
35
+ - name : Determine if the rest of the workflow should run
36
+ id : determination
37
+ run : |
38
+ RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
39
+ # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
40
+ if [[
41
+ "${{ github.event_name }}" != "create" ||
42
+ "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
43
+ ]]; then
44
+ # Run the other jobs.
45
+ RESULT="true"
46
+ else
47
+ # There is no need to run the other jobs.
48
+ RESULT="false"
49
+ fi
50
+
51
+ echo "result=$RESULT" >> $GITHUB_OUTPUT
52
+
29
53
validate :
30
54
name : Validate ${{ matrix.file }}
55
+ needs : run-determination
56
+ if : needs.run-determination.outputs.result == 'true'
31
57
runs-on : ubuntu-latest
32
58
33
59
strategy :
Original file line number Diff line number Diff line change 7
7
8
8
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
9
9
on :
10
+ create :
10
11
push :
11
12
pull_request :
12
13
schedule :
16
17
repository_dispatch :
17
18
18
19
jobs :
20
+ run-determination :
21
+ runs-on : ubuntu-latest
22
+ permissions : {}
23
+ outputs :
24
+ result : ${{ steps.determination.outputs.result }}
25
+ steps :
26
+ - name : Determine if the rest of the workflow should run
27
+ id : determination
28
+ run : |
29
+ RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
30
+ # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
31
+ if [[
32
+ "${{ github.event_name }}" != "create" ||
33
+ "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
34
+ ]]; then
35
+ # Run the other jobs.
36
+ RESULT="true"
37
+ else
38
+ # There is no need to run the other jobs.
39
+ RESULT="false"
40
+ fi
41
+
42
+ echo "result=$RESULT" >> $GITHUB_OUTPUT
43
+
19
44
spellcheck :
45
+ needs : run-determination
46
+ if : needs.run-determination.outputs.result == 'true'
20
47
runs-on : ubuntu-latest
21
48
22
49
steps :
You can’t perform that action at this time.
0 commit comments