Skip to content

Commit d1e77a3

Browse files
committed
fix sims checkout
1 parent 1120524 commit d1e77a3

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/sims.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,33 @@ jobs:
5050
Simulation tests started and triggered by `/runsim`.
5151
Can check further progress [here](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
- uses: actions/checkout@v2
53+
- name: Github API Request
54+
id: request
55+
uses: octokit/[email protected]
56+
if: github.event_name == 'issue_comment'
57+
with:
58+
route: ${{ github.event.issue.pull_request.url }}
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
- name: Get Comment PR informations
62+
id: pr_data
63+
if: github.event_name == 'issue_comment'
64+
run: |
65+
echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
66+
echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
67+
- name: Checkout Comment PR Branch
68+
uses: actions/checkout@v2
69+
if: github.event_name == 'issue_comment'
70+
with:
71+
submodules: true
72+
token: ${{ secrets.GITHUB_TOKEN }}
73+
repository: ${{ steps.pr_data.outputs.repo_name }}
74+
ref: ${{ steps.pr_data.outputs.branch }}
75+
- name: Normal check out code
76+
uses: actions/checkout@v2
77+
with:
78+
submodules: true
79+
if: github.event_name == 'push' || github.event_name == 'pull_request'
5480
- uses: actions/[email protected]
5581
with:
5682
go-version: 1.18

0 commit comments

Comments
 (0)