From 4f78503c4bfa118f9db7b2bcd6cb0c9291aebdd7 Mon Sep 17 00:00:00 2001 From: GuillaumeFalourd Date: Thu, 6 Jan 2022 22:13:47 -0300 Subject: [PATCH] update git push to remote action Signed-off-by: GuillaumeFalourd --- action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/action.yml b/action.yml index dcc73c1..d38f9fe 100644 --- a/action.yml +++ b/action.yml @@ -55,7 +55,6 @@ runs: - name: Git push and commit origin if: ${{ inputs.remote_repository == 'origin' }} run: | - echo "##### Git Push and Commit ORIGIN #####" CURRENT_BRANCH=${GITHUB_REF} case $CURRENT_BRANCH in "refs/heads/"*) CURRENT_BRANCH=$(echo "$CURRENT_BRANCH" | sed "s@refs/heads/@@") @@ -104,7 +103,6 @@ runs: - name: Git push and commit remote if: ${{ inputs.remote_repository != 'origin' }} run: | - echo "##### Git Push and Commit REMOTE #####" if [ -z "${{ inputs.access_token }}" ]; then echo "WARNING: The access_token input is mandatory to push files to another repository." exit 1 @@ -140,7 +138,7 @@ runs: REMOTE_URL=https://$DESTINATION_OWNER:${{ inputs.access_token }}@github.com/$DESTINATION_OWNER/$DESTINATION_REPOSITORY git remote set-url origin $REMOTE_URL git fetch origin - git checkout -b ${{ inputs.target_branch }} + git checkout ${{ inputs.target_branch }} git add . git status