Skip to content

Commit 3ffdf55

Browse files
committed
chore(CI): Checkout pr branch when event is issue_comment
1 parent f2f9431 commit 3ffdf55

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/package_for_test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,22 @@ jobs:
4949
git config --global core.autocrlf false
5050
git config --global core.eol lf
5151
52+
- name: Checkout for push
53+
uses: actions/checkout@v3
54+
if: ${{ github.event_name == 'push' }}
55+
5256
- name: Get PR Branch
5357
if: github.event_name == 'issue_comment'
5458
id: comment-branch
55-
uses: xt0rted/pull-request-comment-branch@v1
59+
uses: yanguoyu/pull-request-comment-branch@v2.0.0.1
5660
with:
5761
repo_token: ${{ secrets.GITHUB_TOKEN }}
5862

59-
- name: Checkout
63+
- name: Checkout for PR
6064
uses: actions/checkout@v3
65+
if: ${{ github.event_name == 'issue_comment' }}
6166
with:
67+
repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }}
6268
ref: ${{ steps.comment-branch.outputs.ref }}
6369

6470
- name: Setup Node

0 commit comments

Comments
 (0)