From 52f82565cc7ded4502df91d7e3ee789d5ea67d68 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Wed, 16 Nov 2022 13:35:12 +1100 Subject: [PATCH] Fix github action "performance-8.0" when PR is from a fork. There is an assumption that the PR is from the same remote as the base it is being merged into. This is fixed so that instead of doing a `git fetch origin`, it now fetches from the `clone_url` of the PR head. Signed-off-by: Peter Serwylo --- .github/workflows/performance.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index cc19978c44e00..4352db26045a4 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -53,8 +53,9 @@ jobs: - name: Apply PR run: | - git fetch origin ${{ github.event.pull_request.head.ref }} - git checkout ${{ github.event.pull_request.head.ref }} + git remote add pr ${{ github.event.pull_request.head.repo.clone_url }} + git fetch pr ${{ github.event.pull_request.head.ref }} + git checkout -b pr/${{ github.event.pull_request.head.ref }} git submodule update ./occ upgrade