mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-14 12:20:30 +02:00
Update entrypoint.sh
This commit is contained in:
@@ -20,10 +20,6 @@ EOF
|
|||||||
|
|
||||||
# Calling method to configure the git environemnt
|
# Calling method to configure the git environemnt
|
||||||
git_setup
|
git_setup
|
||||||
# The remote changes should already be fetched, but as there is #4 this could resolve the problem
|
|
||||||
git fetch
|
|
||||||
# Switch to the actual branch
|
|
||||||
git checkout $INPUT_BRANCH
|
|
||||||
|
|
||||||
echo "Installing prettier..."
|
echo "Installing prettier..."
|
||||||
npm install --silent --global prettier
|
npm install --silent --global prettier
|
||||||
@@ -33,6 +29,10 @@ prettier $INPUT_PRETTIER_OPTIONS || echo "Problem while prettifying your files!"
|
|||||||
if ! git diff --quiet
|
if ! git diff --quiet
|
||||||
then
|
then
|
||||||
echo "Commiting and pushing changes..."
|
echo "Commiting and pushing changes..."
|
||||||
|
# The remote changes should already be fetched, but as there is #4 this could resolve the problem
|
||||||
|
git fetch
|
||||||
|
# Switch to the actual branch
|
||||||
|
git checkout $INPUT_BRANCH
|
||||||
# Add changes to git
|
# Add changes to git
|
||||||
git add "${INPUT_FILE_PATTERN}"
|
git add "${INPUT_FILE_PATTERN}"
|
||||||
# Commit and push changes back
|
# Commit and push changes back
|
||||||
|
|||||||
Reference in New Issue
Block a user