From c80328cf2744d6a89eb7fd42f00f5832cc942de3 Mon Sep 17 00:00:00 2001 From: GuillaumeFalourd Date: Thu, 6 Jan 2022 23:50:46 -0300 Subject: [PATCH] update creating branch section Signed-off-by: GuillaumeFalourd --- action.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index c312da4..ac06b9f 100644 --- a/action.yml +++ b/action.yml @@ -134,15 +134,12 @@ runs: cd "$CLONE_DIRECTORY" - REMOTE_URL=https://$DESTINATION_OWNER:${{ inputs.access_token }}@github.com/$DESTINATION_OWNER/$DESTINATION_REPOSITORY + REMOTE_URL=https://$DESTINATION_OWNER:${{ inputs.access_token }}@github.com/$DESTINATION_OWNER/$DESTINATION_REPOSITORY git remote set-url origin $REMOTE_URL git fetch origin - if [ -z "${{ inputs.target_dir }}" ]; then - git add ${{ inputs.source_files }} - else - git add ${{ inputs.target_dir }}/${{ inputs.source_files }} - fi + git add ${{ inputs.files }} + # Won't commit if no changes were made git diff-index --quiet HEAD || git commit --message "${{ inputs.commit_message }}" git status