mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-15 12:50:31 +02:00
Merge pull request #26 from jorenbroekema/fix/same-commit
Bugfix: Force pushing when using same_commit
This commit is contained in:
@@ -53,6 +53,7 @@ if _git_changed; then
|
|||||||
echo "Amending the current commit..."
|
echo "Amending the current commit..."
|
||||||
git pull
|
git pull
|
||||||
git commit --amend --no-edit
|
git commit --amend --no-edit
|
||||||
|
git push origin -f
|
||||||
else
|
else
|
||||||
if $INPUT_ONLY_CHANGED; then
|
if $INPUT_ONLY_CHANGED; then
|
||||||
for file in $(git diff --name-only HEAD^..HEAD)
|
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}"
|
git add "${INPUT_FILE_PATTERN}" || echo "Problem adding your files with pattern ${INPUT_FILE_PATTERN}"
|
||||||
fi
|
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 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
|
fi
|
||||||
git push origin
|
|
||||||
echo "Changes pushed successfully."
|
echo "Changes pushed successfully."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user