1
+ name : " Check PR complains with requirements"
2
+
3
+ on :
4
+ pull_request_target :
5
+ workflow_run :
6
+ workflows : ['Run tests for PR']
7
+
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.pull_requests[0].number }}
10
+ cancel-in-progress : true
11
+
12
+ jobs :
13
+ reviewdog :
14
+ if : github.event_name == 'workflow_run'
15
+ strategy :
16
+ matrix :
17
+ include :
18
+ - tool : ktlint
19
+ - tool : detekt
20
+ permissions :
21
+ pull-requests : write
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - name : ' Checkout Repository'
25
+ uses : actions/checkout@v4
26
+ - name : Download benchmark results
27
+ uses : dawidd6/action-download-artifact@v6
28
+ with :
29
+ name : style-reports
30
+ path : reports/
31
+ run_id : ${{ github.event.workflow_run.id }}
32
+ - name : Setup reviewdog
33
+ uses : reviewdog/action-setup@v1
34
+ with :
35
+ reviewdog_version : latest
36
+ - name : Run reviewdog ${{ matrix.tool }}
37
+ env :
38
+ REVIEWDOG_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
+ CI_PULL_REQUEST : ${{ github.event.pull_request[0].number }}
40
+ CI_REPO_OWNER : ${{ github.repository_owner }}
41
+ CI_REPO_NAME : ${{ github.event.repository.name }}
42
+ CI_COMMIT : ${{ github.event.workflow_run.pull_requests[0].head.repo }}
43
+ run : echo reports/${{ matrix.tool }}-reviewdog.out | reviewdog -tee -reporter=github-pr-review
44
+ danger-check :
45
+ if : github.event_name == 'pull_request_target'
46
+ runs-on : ubuntu-latest
47
+ permissions :
48
+ pull-requests : write
49
+ statuses : write
50
+ steps :
51
+ - name : ' Checkout Repository'
52
+ uses : actions/checkout@v4
53
+ - name : Danger
54
+
55
+ with :
56
+ run-mode : ci
57
+ dangerfile : Dangerfile.df.kts
58
+ env :
59
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments