From 046985270ab7b09fcea9a4897a9cc0beec6ef522 Mon Sep 17 00:00:00 2001 From: jellespijker Date: Thu, 1 Sep 2022 09:51:46 +0200 Subject: [PATCH] Add optional input is_external_pr --- .github/workflows/conan-recipe-version.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 72dad25033..78ff667387 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -12,6 +12,11 @@ on: default: "" type: string + is_external_pr: + required: false + default: false + type: boolean + outputs: recipe_id_full: description: "The full Conan recipe id: /@/" @@ -53,14 +58,14 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 - if: ${{ ! contains(github.event, 'pull_request') }} + if: ${{ ! is_external_pr }} with: fetch-depth: 0 ref: ${{ github.head_ref }} - name: Checkout repo PR uses: actions/checkout@v3 - if: ${{ contains(github.event, 'pull_request') }} + if: ${{ is_external_pr }} with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.ref }}