Skip to content

Commit 6c2d6ac

Browse files
committed
set Checkout Pull Request step
ref: actions/checkout#331 (comment)
1 parent c33d203 commit 6c2d6ac

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/test-action.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,24 @@ permissions:
99

1010
jobs:
1111
test-action:
12-
name: GitHub Actions Test
12+
name: GitHub Actions Testa
1313
runs-on: ubuntu-latest
1414
permissions:
1515
pull-requests: write
1616
if: github.event.issue.pull_request
1717
steps:
18-
- name: Get PR branch
19-
uses: xt0rted/pull-request-comment-branch@v1
20-
id: comment-branch
21-
2218
- name: Checkout
2319
id: checkout
2420
uses: actions/checkout@v4
25-
with:
26-
ref: ${{ steps.comment-branch.outputs.head_ref }}
21+
22+
- name: Checkout Pull Request
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: |
26+
PR_URL="${{ github.event.issue.pull_request.url }}"
27+
PR_NUM=${PR_URL##*/}
28+
echo "Checking out from PR #$PR_NUM based on URL: $PR_URL"
29+
hub pr checkout $PR_NUM
2730
2831
- name: Test Local Action
2932
id: test-action

0 commit comments

Comments
 (0)