@@ -52,33 +52,17 @@ jobs:
52
52
53
53
steps :
54
54
55
- - name : Load PR
56
-
57
- with :
58
- route : ${{ github.event.pull_request.url }}
59
- env :
60
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61
- id : load_pr
62
-
63
- - name : Get PR information
64
- run : |
65
- echo "::set-output name=branch::${{ fromJson(steps.load_pr.outputs.data).head.ref }}"
66
- echo "::set-output name=head_sha::${{ fromJson(steps.load_pr.outputs.data).head.sha }}"
67
- echo "::set-output name=repo_name::${{ fromJson(steps.load_pr.outputs.data).base.repo.full_name }}"
68
- echo "::set-output name=repo_url::${{ fromJson(steps.load_pr.outputs.data).base.repo.html_url }}"
69
- id : pr
70
-
71
55
- name : Set "queued" status
72
56
73
57
with :
74
58
route : POST /repos/:repository/check-runs
75
- repository : ${{ steps.pr.outputs.repo_name }}
59
+ repository : ${{ github.event.repository.full_name }}
76
60
mediaType : |
77
61
previews:
78
62
- antiope
79
63
name : ${{ env.WIBY_CHECK_NAME }}
80
- details_url : " ${{ steps.pr.outputs.repo_url }}/actions/runs/${{ github.run_id }}"
81
- head_sha : ${{ steps.pr.outputs.head_sha }}
64
+ details_url : " ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}"
65
+ head_sha : ${{ github.event.pull_request.head.sha }}
82
66
status : " queued"
83
67
env :
84
68
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
87
71
uses : actions/checkout@v2
88
72
with :
89
73
token : ${{ secrets.GITHUB_TOKEN }}
90
- repository : ${{ steps.pr.outputs.repo_name }}
91
- ref : ${{ steps.pr.outputs.branch }}
74
+ repository : ${{ github.event.repository.full_name }}
75
+ ref : ${{ github.event.pull_request.head.ref }}
92
76
93
77
- name : Prepare Node.js
94
78
uses : actions/setup-node@v2
@@ -112,13 +96,13 @@ jobs:
112
96
if : ${{ failure() }}
113
97
with :
114
98
route : POST /repos/:repository/check-runs
115
- repository : ${{ steps.pr.outputs.repo_name }}
99
+ repository : ${{ github.event.repository.full_name }}
116
100
mediaType : |
117
101
previews:
118
102
- antiope
119
103
name : ${{ env.WIBY_CHECK_NAME }}
120
- details_url : " ${{ steps.pr.outputs.repo_url }}/actions/runs/${{ github.run_id }}"
121
- head_sha : ${{ steps.pr.outputs.head_sha }}
104
+ details_url : " ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}"
105
+ head_sha : ${{ github.event.pull_request.head.sha }}
122
106
conclusion : " failure"
123
107
env :
124
108
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -127,13 +111,13 @@ jobs:
127
111
128
112
with :
129
113
route : POST /repos/:repository/check-runs
130
- repository : ${{ steps.pr.outputs.repo_name }}
114
+ repository : ${{ github.event.repository.full_name }}
131
115
mediaType : |
132
116
previews:
133
117
- antiope
134
118
name : ${{ env.WIBY_CHECK_NAME }}
135
- details_url : " ${{ steps.pr.outputs.repo_url }}/actions/runs/${{ github.run_id }}"
136
- head_sha : ${{ steps.pr.outputs.head_sha }}
119
+ details_url : " ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}"
120
+ head_sha : ${{ github.event.pull_request.head.sha }}
137
121
status : " in_progress"
138
122
env :
139
123
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -148,28 +132,12 @@ jobs:
148
132
149
133
steps :
150
134
151
- - name : Load PR
152
-
153
- with :
154
- route : ${{ github.event.issue.pull_request.url }}
155
- env :
156
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
157
- id : load_pr
158
-
159
- - name : Get PR information
160
- run : |
161
- echo "::set-output name=branch::${{ fromJson(steps.load_pr.outputs.data).head.ref }}"
162
- echo "::set-output name=head_sha::${{ fromJson(steps.load_pr.outputs.data).head.sha }}"
163
- echo "::set-output name=repo_name::${{ fromJson(steps.load_pr.outputs.data).base.repo.full_name }}"
164
- echo "::set-output name=repo_url::${{ fromJson(steps.load_pr.outputs.data).base.repo.html_url }}"
165
- id : pr
166
-
167
135
- name : Checkout PR Branch
168
136
uses : actions/checkout@v2
169
137
with :
170
138
token : ${{ secrets.GITHUB_TOKEN }}
171
- repository : ${{ steps.pr.outputs.repo_name }}
172
- ref : ${{ steps.pr.outputs.branch }}
139
+ repository : ${{ github.event.repository.full_name }}
140
+ ref : ${{ github.event.pull_request.head.ref }}
173
141
174
142
- name : Prepare Node.js
175
143
uses : actions/setup-node@v2
@@ -214,13 +182,13 @@ jobs:
214
182
if : ${{ failure() }}
215
183
with :
216
184
route : POST /repos/:repository/check-runs
217
- repository : ${{ steps.pr.outputs.repo_name }}
185
+ repository : ${{ github.event.repository.full_name }}
218
186
mediaType : |
219
187
previews:
220
188
- antiope
221
189
name : ${{ env.WIBY_CHECK_NAME }}
222
- details_url : " ${{ steps.pr.outputs.repo_url }}/actions/runs/${{ github.run_id }}"
223
- head_sha : ${{ steps.pr.outputs.head_sha }}
190
+ details_url : " ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}"
191
+ head_sha : ${{ github.event.pull_request.head.sha }}
224
192
conclusion : " failure"
225
193
env :
226
194
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -230,13 +198,13 @@ jobs:
230
198
if : ${{ steps.wiby_result.outputs.wiby_conclusion != '' }}
231
199
with :
232
200
route : POST /repos/:repository/check-runs
233
- repository : ${{ steps.pr.outputs.repo_name }}
201
+ repository : ${{ github.event.repository.full_name }}
234
202
mediaType : |
235
203
previews:
236
204
- antiope
237
205
name : ${{ env.WIBY_CHECK_NAME }}
238
- details_url : " ${{ steps.pr.outputs.repo_url }}/actions/runs/${{ github.run_id }}"
239
- head_sha : ${{ steps.pr.outputs.head_sha }}
206
+ details_url : " ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}"
207
+ head_sha : ${{ github.event.pull_request.head.sha }}
240
208
conclusion : ${{ steps.wiby_result.outputs.wiby_conclusion }}
241
209
env :
242
210
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments