revert removing since-last-remote-commit input

This commit is contained in:
Tonye Jack 2022-09-24 18:59:22 -06:00
parent b6b72a44c8
commit 2c4c729f2a
2 changed files with 6 additions and 1 deletions

View File

@ -50,6 +50,10 @@ inputs:
base_sha: base_sha:
description: "Specify a base commit SHA on used for comparing changes" description: "Specify a base commit SHA on used for comparing changes"
required: false required: false
since_last_remote_commit:
description: "Use the last commit on the remote branch as the base_sha for push event."
required: false
default: "false"
since: since:
description: "Get changed files for commits whose timestamp is older than the given time" description: "Get changed files for commits whose timestamp is older than the given time"
required: false required: false
@ -160,6 +164,7 @@ runs:
INPUT_BASE_SHA: ${{ inputs.base_sha }} INPUT_BASE_SHA: ${{ inputs.base_sha }}
INPUT_SHA: ${{ inputs.sha }} INPUT_SHA: ${{ inputs.sha }}
INPUT_PATH: ${{ inputs.path }} INPUT_PATH: ${{ inputs.path }}
INPUT_SINCE_LAST_REMOTE_COMMIT: ${{ inputs.since_last_remote_commit }}
- run: | - run: |
# "Calculate the sha..." # "Calculate the sha..."
bash $GITHUB_ACTION_PATH/get-sha.sh bash $GITHUB_ACTION_PATH/get-sha.sh

View File

@ -21,7 +21,7 @@ if [[ -n "$INPUT_SINCE" ]]; then
echo "::set-output name=base_sha::$BASE_SHA" echo "::set-output name=base_sha::$BASE_SHA"
elif [[ -n "$INPUT_BASE_SHA" ]]; then elif [[ -n "$INPUT_BASE_SHA" ]]; then
echo "::set-output name=base_sha::$INPUT_BASE_SHA" echo "::set-output name=base_sha::$INPUT_BASE_SHA"
else elif [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
LAST_REMOTE_COMMIT="$GITHUB_EVENT_BEFORE" LAST_REMOTE_COMMIT="$GITHUB_EVENT_BEFORE"
if [[ -z "$LAST_REMOTE_COMMIT" || "$LAST_REMOTE_COMMIT" == "0000000000000000000000000000000000000000" ]]; then if [[ -z "$LAST_REMOTE_COMMIT" || "$LAST_REMOTE_COMMIT" == "0000000000000000000000000000000000000000" ]]; then