Skip to content

Commit

Permalink
meh
Browse files Browse the repository at this point in the history
  • Loading branch information
feisuzhu committed Dec 18, 2024
1 parent 2a53629 commit 5fd5baf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/scripts/common-utils.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
function UnsetGitCachingProxy {
Write-Host "Unsetting git caching proxy"
git config --global --unset-all url.http://git-cdn-github.botmaster.tgr/.insteadOf
git config --global --unset-all url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf
# git config --global --unset-all url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf
}

function SetGitCachingProxy {
Write-Host "Setting up git caching proxy"
git config --global --add url.http://git-cdn-github.botmaster.tgr/.insteadOf https://github.com/
git config --global --add url.http://git-cdn-github.botmaster.tgr/.insteadOf git@github.com:
git config --global --add url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf https://gitlab.com/
# git config --global --add url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf https://gitlab.com/
git config --global credential.helper store
"http://oauth2:${env:GITHUB_TOKEN}@git-cdn-github.botmaster.tgr" | Out-File -FilePath ~\.git-credentials
}

if($env:TI_USE_GIT_CACHE) {
Expand Down Expand Up @@ -242,6 +244,7 @@ function CIDockerRun {
-e PIP_CACHE_DIR=X:/pip-cache `
-e GIT_ALTERNATE_OBJECT_DIRECTORIES=X:/git-cache/objects `
-e TI_CI=1 `
-e GITHUB_TOKEN `
@TiEnvs `
-v (($env:LocalAppData -replace "\\", "/") + "/build-cache:X:") `
@extraArgs `
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scripts/common-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ function ci-docker-run {
-e SCCACHE_ROOT=/var/lib/sccache \
-e CACHE_HOME=/var/lib/cache-home \
-e GIT_ALTERNATE_OBJECT_DIRECTORIES=/var/lib/git-cache/objects \
-e GITHUB_TOKEN \
-v $(readlink -f $CACHE_HOME):/var/lib/cache-home \
-v $(readlink -f $CACHE_HOME/sccache):/var/lib/sccache \
-v $(readlink -f $CACHE_HOME/git-cache):/var/lib/git-cache \
Expand Down

0 comments on commit 5fd5baf

Please sign in to comment.