Skip to content

Commit

Permalink
Use zip for linux bc artifacts from GH graph-runner are already zipped
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrath committed May 24, 2024
1 parent 46eca45 commit 93f3d61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37069,14 +37069,13 @@ function run() {
}
else {
const baseUrl = `https://github.com/actionforge/${pj.name}/releases/download/v${pj.version}`;
const archiveExt = os_1.default.platform() === "linux" ? "tar.gz" : "zip";
const downloadUrl = `${runnerBaseUrl.replace(/\/$/, "") || baseUrl}/graph-runner-${os_1.default.platform()}-${os_1.default.arch()}.${archiveExt}`;
const downloadUrl = `${runnerBaseUrl.replace(/\/$/, "") || baseUrl}/graph-runner-${os_1.default.platform()}-${os_1.default.arch()}.zip`;
if (runnerBaseUrl) {
console.log("\u27a1 Custom runner URL set:", downloadUrl);
}
const downloadInfo = {
downloadUrl: downloadUrl,
filename: 'graph-runner',
filename: `graph-runner-${os_1.default.platform()}-${os_1.default.arch()}`,
};
runnerPath = yield downloadRunner(downloadInfo, runnerBaseUrl ? null : token, runnerBaseUrl ? false : true);
}
Expand Down
5 changes: 2 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,14 @@ async function run(): Promise<void> {
console.log("\u27a1 Custom runner path set:", runnerPath);
} else {
const baseUrl = `https://github.com/actionforge/${pj.name}/releases/download/v${pj.version}`;
const archiveExt = os.platform() === "linux" ? "tar.gz" : "zip";
const downloadUrl = `${runnerBaseUrl.replace(/\/$/, "") || baseUrl}/graph-runner-${os.platform()}-${os.arch()}.${archiveExt}`;
const downloadUrl = `${runnerBaseUrl.replace(/\/$/, "") || baseUrl}/graph-runner-${os.platform()}-${os.arch()}.zip`;
if (runnerBaseUrl) {
console.log("\u27a1 Custom runner URL set:", downloadUrl);
}

const downloadInfo = {
downloadUrl: downloadUrl,
filename: 'graph-runner',
filename: `graph-runner-${os.platform()}-${os.arch()}`,
};

runnerPath = await downloadRunner(downloadInfo, runnerBaseUrl ? null : token, runnerBaseUrl ? false : true);
Expand Down

0 comments on commit 93f3d61

Please sign in to comment.