diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e013e5d3..d64c96e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: if: ${{ github.event_name == 'push'}} run: | cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} - git remote add user_repo https://github.com/${{ github.repository}} + git remote add user_repo git fetch user_repo ${{ github.head_ref || github.ref_name }} git checkout -b user_repo/${{ github.head_ref || github.ref_name }} shell: bash @@ -43,8 +43,8 @@ jobs: if: ${{github.event_name == 'pull_request'}} run: | cd ~/${{github.event.pull_request.head.repo.name || github.event.repository.name }} - git remote add user_repo https://github.com/${{ github.event.pull_request.head.repo.name }} - git fetch user_repo ${{ github.event.pull_request.head.ref}} ${{ github.event.pull_request.head.repo.html_url}} + git remote add user_repo + github.event.pull_request.head.ref}} ${{ github.event.pull_request.head.repo.html_url}} git checkout -b user_repo/${{ github.event.pull_request.head.ref}} ${{ github.event.pull_request.head.repo.html_url}} shell: bash