From 76466b776afd3ef7d848584682e29ec74893aaf2 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Thu, 1 Sep 2022 12:00:07 +0200 Subject: [PATCH] Use different checkout scheme based on forked repo --- .github/workflows/conan-recipe-version.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 7c99b61c9e..c6bac8d8ab 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -12,11 +12,6 @@ on: default: "" type: string - is_external_pr: - required: false - default: false - type: boolean - outputs: recipe_id_full: description: "The full Conan recipe id: /@/" @@ -58,14 +53,14 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 - if: ${{ ! inputs.is_external_pr }} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} with: fetch-depth: 0 ref: ${{ github.head_ref }} - name: Checkout repo PR uses: actions/checkout@v3 - if: ${{ inputs.is_external_pr }} + if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.ref }}