From f3c238d939b743703c092c24745bbbb8ebd63e52 Mon Sep 17 00:00:00 2001 From: Katy Baulch <46493669+katybaulch@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:03:59 +0000 Subject: [PATCH] Use bool instead of str comparison --- action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index e022e29..4ccbaa6 100644 --- a/action.yml +++ b/action.yml @@ -85,8 +85,10 @@ runs: shell: bash id: determine_next_tag run: | - if [[ ${{ (inputs.pr_body != '' && inputs.pr_number != '') == 'true' }} ]]; then + if [[ ${{ (inputs.pr_body != '' && inputs.pr_number != '') == true }} ]]; then echo "new_tag=${{ steps.determine_next_tag_from_pr_event.outputs.new_tag }}" >> "$GITHUB_OUTPUT" - elif [[ ${{ (inputs.pr_body == '' && inputs.pr_number == '') }} == 'true' ]]; then + elif [[ ${{ (inputs.pr_body == '' && inputs.pr_number == '') }} == true ]]; then echo "new_tag=${{ steps.determine_next_tag_retrospectively.outputs.new_tag }}" >> "$GITHUB_OUTPUT" + else + echo "PR body or number present. Either both or neither must be passed." fi