diff --git a/.github/workflows/perf-test.yml b/.github/workflows/perf-test.yml index f34c8e2ae6..750985e8fc 100644 --- a/.github/workflows/perf-test.yml +++ b/.github/workflows/perf-test.yml @@ -44,11 +44,19 @@ jobs: ports: - 27017:27017 steps: - # Check out merge commit between the PR branch & base branch - - name: Fork based /perf-test checkout + - name: Checkout the merged commit from PR and base branch + if: inputs.pr != 0 uses: actions/checkout@v3 with: - ref: "refs/pull/${{ github.event.client_payload.pull_request.number }}/merge" + fetch-depth: 0 + ref: refs/pull/${{ inputs.pr }}/merge + + # Checkout the code in the current branch in case the workflow is called because of a branch push event + - name: Checkout the head commit of the branch + if: inputs.pr == 0 + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Figure out the PR number run: echo ${{ inputs.pr }}