From 3c5eb02712602a998826b052241c54a050d54d14 Mon Sep 17 00:00:00 2001 From: jorenbroekema Date: Sat, 17 Oct 2020 21:50:28 +0200 Subject: [PATCH] fix: force push when using same_commit option since we amend --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 27628e2..90db9c1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -53,6 +53,7 @@ if _git_changed; then echo "Amending the current commit..." git pull git commit --amend --no-edit + git push origin -f else if $INPUT_ONLY_CHANGED; then for file in $(git diff --name-only HEAD^..HEAD) @@ -64,8 +65,8 @@ if _git_changed; then git add "${INPUT_FILE_PATTERN}" || echo "Problem adding your files with pattern ${INPUT_FILE_PATTERN}" fi git commit -m "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"} || echo "No files added to commit" + git push origin fi - git push origin echo "Changes pushed successfully." fi else