ci: Reactor perf tests checkout step to checkout the code correctly. (#19267)
Earlier code wasn't checked out correctly when test-build-docker workflow ran, this PR adds conditional checkout.
This commit is contained in:
parent
788cfe995b
commit
42a7c40c37
14
.github/workflows/perf-test.yml
vendored
14
.github/workflows/perf-test.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user