update git push to remote action

Signed-off-by: GuillaumeFalourd <guillaume.falourd@zup.com.br>
This commit is contained in:
GuillaumeFalourd 2022-01-06 22:24:08 -03:00
parent 4f78503c4b
commit d53ba3b49f

View file

@ -138,6 +138,10 @@ runs:
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 remote set-url origin $REMOTE_URL
git fetch origin git fetch origin
git ls-remote --heads origin ${{ inputs.target_branch }} | wc -l
if [ "$?" != "1" ]; then
git checkout -b ${{ inputs.target_branch }}
fi
git checkout ${{ inputs.target_branch }} git checkout ${{ inputs.target_branch }}
git add . git add .
git status git status