Skip to content

Commit 34bd249

Browse files
committed
Skip verifying signature for now
1 parent 4a6c27e commit 34bd249

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async function run() {
1616
case "darwin":
1717
throw Error("Not implemented yet on macOS");
1818
case "linux":
19-
await setupLinux();
19+
await setupLinux({ skipVerifySignature: true });
2020
break;
2121
case "win32":
2222
throw Error("Not implemented yet on Windows");

src/swiftly/install-linux.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,27 @@ import { addPath, debug, info } from "@actions/core";
33
import { downloadTool, find, extractTar, cacheDir } from "@actions/tool-cache";
44
import { verify } from "../core/gpg";
55

6+
interface Options {
7+
/** Skip signature verification */
8+
skipVerifySignature?: boolean;
9+
}
10+
611
/**
712
* Setup Swiftly on Linux
813
*/
9-
export async function setupLinux() {
14+
export async function setupLinux(options: Options) {
1015
let path = find("swiftly", "1.0.0");
1116

1217
if (!path) {
13-
path = await download();
18+
path = await download(options);
1419
} else {
1520
debug("Found cached Swiftly");
1621
}
1722

1823
addPath(path);
1924
}
2025

21-
async function download() {
26+
async function download({ skipVerifySignature = false }: Options = {}) {
2227
info("Downloading Swiftly");
2328

2429
const m = machine();
@@ -31,7 +36,11 @@ async function download() {
3136
downloadTool(`${url}.sig`),
3237
]);
3338

34-
await verify(signature, pkg);
39+
if (skipVerifySignature) {
40+
info("Skipping signature verification");
41+
} else {
42+
await verify(signature, pkg);
43+
}
3544

3645
const extracted = await extractTar(pkg);
3746
debug(`Extracted Swiftly to ${extracted}`);

0 commit comments

Comments
 (0)