Add optional input is_external_pr

This commit is contained in:
jellespijker 2022-09-01 09:51:46 +02:00 committed by Jelle Spijker
parent 2385b00af3
commit 046985270a

View File

@ -12,6 +12,11 @@ on:
default: "" default: ""
type: string type: string
is_external_pr:
required: false
default: false
type: boolean
outputs: outputs:
recipe_id_full: recipe_id_full:
description: "The full Conan recipe id: <name>/<version>@<user>/<channel>" description: "The full Conan recipe id: <name>/<version>@<user>/<channel>"
@ -53,14 +58,14 @@ jobs:
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v3
if: ${{ ! contains(github.event, 'pull_request') }} if: ${{ ! is_external_pr }}
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- name: Checkout repo PR - name: Checkout repo PR
uses: actions/checkout@v3 uses: actions/checkout@v3
if: ${{ contains(github.event, 'pull_request') }} if: ${{ is_external_pr }}
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }} ref: ${{ github.event.pull_request.head.ref }}