@@ -104,10 +104,36 @@ jobs:
104104 runs-on : ubuntu-latest
105105 needs : [build, install-runsim]
106106 steps :
107- - uses : actions/checkout@v2
108- 107+ - name : Github API Request
108+ id : request
109+ 110+ if : github.event_name == 'issue_comment'
109111 with :
110- go-version : 1.18
112+ route : ${{ github.event.issue.pull_request.url }}
113+ env :
114+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
115+ - name : Get Comment PR informations
116+ id : pr_data
117+ if : github.event_name == 'issue_comment'
118+ run : |
119+ echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
120+ echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
121+ - uses : actions/setup-go@v2
122+ with :
123+ go-version : 1.18.3
124+ - name : Checkout Comment PR Branch
125+ uses : actions/checkout@v2
126+ if : github.event_name == 'issue_comment'
127+ with :
128+ submodules : true
129+ token : ${{ secrets.GITHUB_TOKEN }}
130+ repository : ${{ steps.pr_data.outputs.repo_name }}
131+ ref : ${{ steps.pr_data.outputs.branch }}
132+ - name : Normal check out code
133+ uses : actions/checkout@v2
134+ if : github.event_name == 'push' || github.event_name == 'pull_request'
135+ with :
136+ submodules : true
111137 - name : Display go version
112138 run : go version
113139 # the original repo technote-space does not include auto_merge_enabled into target events
@@ -137,10 +163,36 @@ jobs:
137163 runs-on : ubuntu-latest
138164 needs : [build, install-runsim]
139165 steps :
140- - uses : actions/checkout@v2
141- 166+ - name : Github API Request
167+ id : request
168+ 169+ if : github.event_name == 'issue_comment'
142170 with :
143- go-version : 1.18
171+ route : ${{ github.event.issue.pull_request.url }}
172+ env :
173+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
174+ - name : Get Comment PR informations
175+ id : pr_data
176+ if : github.event_name == 'issue_comment'
177+ run : |
178+ echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
179+ echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
180+ - uses : actions/setup-go@v2
181+ with :
182+ go-version : 1.18.3
183+ - name : Checkout Comment PR Branch
184+ uses : actions/checkout@v2
185+ if : github.event_name == 'issue_comment'
186+ with :
187+ submodules : true
188+ token : ${{ secrets.GITHUB_TOKEN }}
189+ repository : ${{ steps.pr_data.outputs.repo_name }}
190+ ref : ${{ steps.pr_data.outputs.branch }}
191+ - name : Normal check out code
192+ uses : actions/checkout@v2
193+ if : github.event_name == 'push' || github.event_name == 'pull_request'
194+ with :
195+ submodules : true
144196 - name : Display go version
145197 run : go version
146198 # the original repo technote-space does not include auto_merge_enabled into target events
@@ -170,10 +222,36 @@ jobs:
170222 runs-on : ubuntu-latest
171223 needs : [build, install-runsim]
172224 steps :
173- - uses : actions/checkout@v2
174- 225+ - name : Github API Request
226+ id : request
227+ 228+ if : github.event_name == 'issue_comment'
175229 with :
176- go-version : 1.18
230+ route : ${{ github.event.issue.pull_request.url }}
231+ env :
232+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
233+ - name : Get Comment PR informations
234+ id : pr_data
235+ if : github.event_name == 'issue_comment'
236+ run : |
237+ echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
238+ echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
239+ - uses : actions/setup-go@v2
240+ with :
241+ go-version : 1.18.3
242+ - name : Checkout Comment PR Branch
243+ uses : actions/checkout@v2
244+ if : github.event_name == 'issue_comment'
245+ with :
246+ submodules : true
247+ token : ${{ secrets.GITHUB_TOKEN }}
248+ repository : ${{ steps.pr_data.outputs.repo_name }}
249+ ref : ${{ steps.pr_data.outputs.branch }}
250+ - name : Normal check out code
251+ uses : actions/checkout@v2
252+ if : github.event_name == 'push' || github.event_name == 'pull_request'
253+ with :
254+ submodules : true
177255 - name : Display go version
178256 run : go version
179257 # the original repo technote-space does not include auto_merge_enabled into target events
@@ -203,10 +281,36 @@ jobs:
203281 runs-on : ubuntu-latest
204282 needs : [build, install-runsim]
205283 steps :
206- - uses : actions/checkout@v2
207- 284+ - name : Github API Request
285+ id : request
286+ 287+ if : github.event_name == 'issue_comment'
208288 with :
209- go-version : 1.18
289+ route : ${{ github.event.issue.pull_request.url }}
290+ env :
291+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
292+ - name : Get Comment PR informations
293+ id : pr_data
294+ if : github.event_name == 'issue_comment'
295+ run : |
296+ echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
297+ echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
298+ - uses : actions/setup-go@v2
299+ with :
300+ go-version : 1.18.3
301+ - name : Checkout Comment PR Branch
302+ uses : actions/checkout@v2
303+ if : github.event_name == 'issue_comment'
304+ with :
305+ submodules : true
306+ token : ${{ secrets.GITHUB_TOKEN }}
307+ repository : ${{ steps.pr_data.outputs.repo_name }}
308+ ref : ${{ steps.pr_data.outputs.branch }}
309+ - name : Normal check out code
310+ uses : actions/checkout@v2
311+ if : github.event_name == 'push' || github.event_name == 'pull_request'
312+ with :
313+ submodules : true
210314 - name : Display go version
211315 run : go version
212316 # the original repo technote-space does not include auto_merge_enabled into target events
0 commit comments