Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a6c8729

Browse filesBrowse files
authored
Merge pull request #2614 from github/marcogario/per-platform-proxy
Start-proxy: Fetch OS specific binary
2 parents cba5fb5 + 8f3b487 commit a6c8729
Copy full SHA for a6c8729

File tree

Expand file treeCollapse file tree

3 files changed

+33
-14
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+33
-14
lines changed

‎lib/start-proxy-action.js

Copy file name to clipboardExpand all lines: lib/start-proxy-action.js
+14-6Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/start-proxy-action.js.map

Copy file name to clipboardExpand all lines: lib/start-proxy-action.js.map
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/start-proxy-action.ts

Copy file name to clipboardExpand all lines: src/start-proxy-action.ts
+18-7Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { getActionsLogger, Logger } from "./logging";
1010
import * as util from "./util";
1111

1212
const UPDATEJOB_PROXY = "update-job-proxy";
13-
const UPDATEJOB_PROXY_VERSION = "v2.0.20240722180912";
14-
const UPDATEJOB_PROXY_URL =
15-
"https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/update-job-proxy.tar.gz";
13+
const UPDATEJOB_PROXY_VERSION = "v2.0.20241023203727";
14+
const UPDATEJOB_PROXY_URL_PREFIX =
15+
"https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/";
1616
const PROXY_USER = "proxy_user";
1717
const KEY_SIZE = 2048;
1818
const KEY_EXPIRY_YEARS = 2;
@@ -229,17 +229,28 @@ function getProxyAuth(): BasicAuthCredentials | undefined {
229229
}
230230

231231
async function getProxyBinaryPath(): Promise<string> {
232-
let proxyBin = toolcache.find(UPDATEJOB_PROXY, UPDATEJOB_PROXY_VERSION);
232+
const proxyFileName =
233+
process.platform === "win32" ? `${UPDATEJOB_PROXY}.exe` : UPDATEJOB_PROXY;
234+
const platform =
235+
process.platform === "win32"
236+
? "win64"
237+
: process.platform === "darwin"
238+
? "osx64"
239+
: "linux64";
240+
const proxyPackage = `${UPDATEJOB_PROXY}-${platform}.tar.gz`;
241+
const proxyURL = `${UPDATEJOB_PROXY_URL_PREFIX}${proxyPackage}`;
242+
243+
let proxyBin = toolcache.find(proxyFileName, UPDATEJOB_PROXY_VERSION);
233244
if (!proxyBin) {
234-
const temp = await toolcache.downloadTool(UPDATEJOB_PROXY_URL);
245+
const temp = await toolcache.downloadTool(proxyURL);
235246
const extracted = await toolcache.extractTar(temp);
236247
proxyBin = await toolcache.cacheDir(
237248
extracted,
238-
UPDATEJOB_PROXY,
249+
proxyFileName,
239250
UPDATEJOB_PROXY_VERSION,
240251
);
241252
}
242-
proxyBin = path.join(proxyBin, UPDATEJOB_PROXY);
253+
proxyBin = path.join(proxyBin, proxyFileName);
243254
return proxyBin;
244255
}
245256

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.