From 4daffbaee17b34b8ae544990906277485819cc16 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Thu, 17 Feb 2022 23:23:53 -0500 Subject: [PATCH] feat: Use previous commit when since_last_remote_commit is set to true (#388) --- action.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 256515f7..771235c5 100644 --- a/action.yml +++ b/action.yml @@ -123,12 +123,8 @@ runs: # "Set base sha..." if [[ -n "${{ inputs.base_sha }}" ]]; then echo "::set-output name=base_sha::${{ inputs.base_sha }}" - elif [[ "${{ inputs.since_last_remote_commit }}" == "true" ]]; then - if [[ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then + elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then echo "::set-output name=base_sha::${{ github.event.before }}" - else - echo "::set-output name=base_sha::${{ github.sha }}" - fi fi id: base-sha shell: bash