Skip to content

Commit

Permalink
use token for manual clone
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Aug 28, 2024
1 parent 7b462e1 commit 346fe60
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/upstream pretest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,14 @@ jobs:
$main_repo_url = '${{ github.server_url }}/${{ github.repository }}'
$main_repo_branch = '${{ github.event.repository.default_branch }}'
Write-Host "Cloning main repo [$main_repo_url]: branch [$main_repo_branch]"
git clone -b $main_repo_branch --filter=tree:0 --no-progress --no-checkout $main_repo_url .
if (-not $?) { throw "git clone failed" }
git init
if (-not $?) { throw "git init failed" }
git remote add origin $main_repo_url
if (-not $?) { throw "git remote add failed" }
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${{ secrets.GITHUB_TOKEN }}"
if (-not $?) { throw "git config failed" }
git fetch --depth=1 origin $main_repo_branch --filter=tree:0 --no-progress
if (-not $?) { throw "git fetch failed" }
# git branch -r
Expand Down

0 comments on commit 346fe60

Please sign in to comment.