File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change 1
1
name : Tests
2
2
on :
3
+ push :
4
+ branches :
5
+ - ' **'
6
+ tags-ignore :
7
+ - ' **'
3
8
pull_request :
4
- types : [ labeled, synchronize ]
9
+ types : labeled
5
10
jobs :
11
+ label :
12
+ name : Find 'Test Matoya' Label
13
+ runs-on : ubuntu-latest
14
+ outputs :
15
+ label_exists : ${{contains(steps.pull_request.outputs.result, 'Test Matoya') || contains(toJson(github.event.label.name), 'Test Matoya')}}
16
+ permissions :
17
+ id-token : write
18
+ contents : read
19
+ pull-requests : read
20
+ steps :
21
+ - name : pull_request
22
+ id : pull_request
23
+ uses : actions/github-script@v7
24
+ with :
25
+ script : |
26
+ pull_requests = (
27
+ await github.rest.repos.listPullRequestsAssociatedWithCommit({
28
+ commit_sha: context.sha,
29
+ owner: context.repo.owner,
30
+ repo: context.repo.repo,
31
+ })).data;
32
+ if (pull_requests.constructor === Array && pull_requests.length > 0 && "labels" in pull_requests[0])
33
+ return pull_requests[0]["labels"];
34
+ return "";
6
35
macos :
7
36
name : macOS
8
37
runs-on : macos-latest
38
+ needs : label
39
+ if : ${{needs.label.outputs.label_exists == 'true'}}
9
40
permissions :
10
41
id-token : write
11
42
contents : read
25
56
linux :
26
57
name : Linux
27
58
runs-on : ubuntu-latest
59
+ needs : label
60
+ if : ${{needs.label.outputs.label_exists == 'true'}}
28
61
permissions :
29
62
id-token : write
30
63
contents : read
44
77
windows :
45
78
name : ${{ matrix.config.name }}
46
79
runs-on : ${{ matrix.config.os }}
80
+ needs : label
81
+ if : ${{needs.label.outputs.label_exists == 'true'}}
47
82
permissions :
48
83
id-token : write
49
84
contents : read
You can’t perform that action at this time.
0 commit comments