From 809d8c0bbf86574c3fefb478fcfa8f8c26e2743c Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 6 Jan 2022 16:11:53 -0300 Subject: [PATCH] Update action.yml --- action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 9dee219..ad972b8 100644 --- a/action.yml +++ b/action.yml @@ -85,10 +85,6 @@ runs: git config --local user.name "${{ inputs.name }}" if [[ `git status --porcelain` ]]; then - git add ${{ inputs.files }} -v - git commit -m "${{ inputs.commit_message }}" $EMPTY - - REGEX="^(https|git)(:\/\/|@)([^\/:]+)[\/:]([^\/:]+)\/(.+)$" if [[ ${{ inputs.remote_repository }} =~ $REGEX ]]; then PROTOCOL=${BASH_REMATCH[1]} @@ -99,8 +95,11 @@ runs: DESTINATION_REPOSITORY=${DESTINATION_REPOSITORY//.git/ } REMOTE_URL=https://$DESTINATION_OWNER:${{ inputs.access_token }}@github.com/$DESTINATION_OWNER/$DESTINATION_REPOSITORY git remote set-url origin $REMOTE_URL + git fetch origin fi + git add ${{ inputs.files }} -v + git commit -m "${{ inputs.commit_message }}" $EMPTY git branch push-and-commit-action-${{ github.run_id }}-${{ github.job }} git fetch "${{ inputs.remote_repository }}" "$CURRENT_BRANCH" git checkout "$CURRENT_BRANCH"