buildx(install): use sigstore module to verify signature
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -29,7 +29,12 @@ maybe('download', () => {
|
||||
const install = new Install({
|
||||
standalone: true
|
||||
});
|
||||
const toolPath = await install.download(version);
|
||||
const toolPath = await install.download({
|
||||
version: version,
|
||||
verifySignature: true,
|
||||
ghaNoCache: true,
|
||||
disableHtc: true
|
||||
});
|
||||
if (!fs.existsSync(toolPath)) {
|
||||
throw new Error('toolPath does not exist');
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('download', () => {
|
||||
])(
|
||||
'acquires %p of buildx (standalone: %p)', async (version, standalone) => {
|
||||
const install = new Install({standalone: standalone});
|
||||
const toolPath = await install.download(version);
|
||||
const toolPath = await install.download({version});
|
||||
expect(fs.existsSync(toolPath)).toBe(true);
|
||||
let buildxBin: string;
|
||||
if (standalone) {
|
||||
@@ -58,7 +58,7 @@ describe('download', () => {
|
||||
])(
|
||||
'acquires %p of buildx with cache', async (version) => {
|
||||
const install = new Install({standalone: false});
|
||||
const toolPath = await install.download(version);
|
||||
const toolPath = await install.download({version});
|
||||
expect(fs.existsSync(toolPath)).toBe(true);
|
||||
}, 100000);
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('download', () => {
|
||||
])(
|
||||
'acquires %p of buildx without cache', async (version) => {
|
||||
const install = new Install({standalone: false});
|
||||
const toolPath = await install.download(version, true);
|
||||
const toolPath = await install.download({version: version, ghaNoCache: true});
|
||||
expect(fs.existsSync(toolPath)).toBe(true);
|
||||
}, 100000);
|
||||
|
||||
@@ -89,7 +89,7 @@ describe('download', () => {
|
||||
mockPlatform(os as NodeJS.Platform);
|
||||
mockArch(arch);
|
||||
const install = new Install();
|
||||
const buildxBin = await install.download('latest');
|
||||
const buildxBin = await install.download({version: 'latest'});
|
||||
expect(fs.existsSync(buildxBin)).toBe(true);
|
||||
}, 100000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user