mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-15 21:00:35 +02:00
Removed $INPUT_BRANCH completely
This commit is contained in:
@@ -25,16 +25,6 @@ _git_changed() {
|
|||||||
[[ -n "$(git status -s)" ]]
|
[[ -n "$(git status -s)" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pushes to the according upstream (origin or input branch)
|
|
||||||
_git_push() {
|
|
||||||
if [ -z "$INPUT_BRANCH" ]
|
|
||||||
then
|
|
||||||
git push origin
|
|
||||||
else
|
|
||||||
git push --set-upstream origin "HEAD:$INPUT_BRANCH"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# PROGRAM
|
# PROGRAM
|
||||||
echo "Installing prettier..."
|
echo "Installing prettier..."
|
||||||
if "$INPUT_PRETTIER_VERSION"; then
|
if "$INPUT_PRETTIER_VERSION"; then
|
||||||
@@ -61,7 +51,7 @@ 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}"
|
||||||
# Commit and push changes back
|
# Commit and push changes back
|
||||||
git commit -m "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"}
|
git commit -m "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"}
|
||||||
_git_push
|
git push origin
|
||||||
echo "Changes pushed successfully."
|
echo "Changes pushed successfully."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user