Skip to content

Commit 1950d9a

Browse files
committed
fix(upgrader): github proxy for downloading digest
1 parent de8d607 commit 1950d9a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
uses: actions/setup-go@v5
124124
with:
125125
go-version: ^1.21.6
126-
126+
127127
- name: Setup compiler environment
128128
id: info
129129
run: |

internal/upgrader/upgrade.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ func (u *Upgrader) DownloadLatestRelease(progressChan chan float64) (tarName str
288288
return
289289
}
290290

291+
if settings.ServerSettings.GithubProxy != "" {
292+
digest.BrowserDownloadUrl, err = url.JoinPath(settings.ServerSettings.GithubProxy, digest.BrowserDownloadUrl)
293+
if err != nil {
294+
err = errors.Wrap(err, "service.DownloadLatestRelease url.JoinPath error")
295+
return
296+
}
297+
}
298+
291299
resp, err := http.Get(digest.BrowserDownloadUrl)
292300

293301
if err != nil {

0 commit comments

Comments
 (0)