From 0b546dce7febcbf9f1576bf3f1a676e91696db54 Mon Sep 17 00:00:00 2001 From: b-ma Date: Wed, 19 Jul 2023 15:25:47 +0200 Subject: [PATCH] fix: use PR branch in benchmarks --- .github/workflows/benchmark.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index ea3b99c1..cb16c3a7 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -20,11 +20,18 @@ jobs: if: ${{ github.event.issue.pull_request }} && contains(github.event.comment.body, '/bench') steps: - # checkout repo, install dependencies - - uses: actions/checkout@v3 - with: - fetch-depth: 0 + # the workflow is triggered from main branch + # cf. https://github.com/actions/checkout/issues/331 + # need this first step to init the git repo + - name: Checkout + uses: actions/checkout@v3 + + - name: Checkout Pull Request + run: hub pr checkout ${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # install dependencies - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable