Skip to content

Commit

Permalink
Use bool instead of str comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Mar 28, 2024
1 parent 044bd75 commit f3c238d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f3c238d

Please sign in to comment.