Skip to content

Commit 0b546dc

Browse files
committed
fix: use PR branch in benchmarks
1 parent 2b6c42a commit 0b546dc

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/benchmark.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@ jobs:
2020
if: ${{ github.event.issue.pull_request }} && contains(github.event.comment.body, '/bench')
2121

2222
steps:
23-
# checkout repo, install dependencies
24-
- uses: actions/checkout@v3
25-
with:
26-
fetch-depth: 0
23+
# the workflow is triggered from main branch
24+
# cf. https://github.com/actions/checkout/issues/331
25+
# need this first step to init the git repo
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Checkout Pull Request
30+
run: hub pr checkout ${{ github.event.issue.number }}
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2733

34+
# install dependencies
2835
- name: Install Rust toolchain
2936
uses: dtolnay/rust-toolchain@stable
3037

0 commit comments

Comments
 (0)