From ce4e1eba948925d97b384add9c104d68ada70d13 Mon Sep 17 00:00:00 2001 From: Jason Fields Date: Fri, 20 Nov 2020 17:20:46 -0500 Subject: [PATCH] Exclude deleted files when using `only_changed` Fixes #31 --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index b9f430d..4db8011 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -50,7 +50,8 @@ if _git_changed; then _git_setup if $INPUT_ONLY_CHANGED; then - for file in $(git diff --name-only HEAD^..HEAD) + # --diff-filter=d excludes deleted files + for file in $(git diff --name-only --diff-filter=d HEAD^..HEAD) do git add $file done