From c98ba883a82b6d5bcce836360c60c09ec357ebec Mon Sep 17 00:00:00 2001 From: tsr07843 Date: Wed, 2 Oct 2024 12:20:51 -0400 Subject: [PATCH] feat: Support GH Enterprise and http protocol --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ab19187..05dded9 100644 --- a/action.yml +++ b/action.yml @@ -82,7 +82,8 @@ runs: git config user.email "${{ inputs.commit-email }}" git add . git commit -m "${{ inputs.commit-message }}" - git push --force "https://${{ github.actor }}:${{ inputs.token }}@github.com/${{ github.repository }}" main:${{ inputs.branch }} + REMOTE=$(echo "${{ github.server_url }}" | sed 's/\(https\?:\/\/\)\(.*\)/\1${{ github.actor }}:${{ inputs.token }}@\2/') + git push --force "$REMOTE/${{ github.repository }}" main:${{ inputs.branch }} working-directory: ${{ inputs.working-directory }} - name: 'Cleanup' shell: 'bash'