From 426bb27465907b1fe342c0b5fb3bec7f30362d30 Mon Sep 17 00:00:00 2001 From: Conrad Date: Mon, 17 Feb 2020 10:38:41 +0100 Subject: [PATCH] Update entrypoint.sh --- entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 99de4d8..45f67f1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,8 +18,12 @@ EOF git config --global user.name "GitHub Actions" } +# Calling method to configure the git environemnt +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..." npm install --silent --global prettier @@ -29,10 +33,6 @@ prettier $INPUT_PRETTIER_OPTIONS || echo "Problem while prettifying your files!" if ! git diff --quiet then echo "Commiting and pushing changes..." - # Calling method to configure the git environemnt - git_setup - # Switch to the actual branch - git checkout $INPUT_BRANCH # Add changes to git git add "${INPUT_FILE_PATTERN}" # Commit and push changes back