Skip to content

Commit 0ea9d89

Browse files
authored
Merge pull request #828 from crazy-max/cosign-skip-state
cosign(install): skipState opt to directly upload to GHA cache
2 parents dfe6c8d + 1764424 commit 0ea9d89

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/cosign/install.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class Install {
4848
this.buildx = opts?.buildx || new Buildx();
4949
}
5050

51-
public async download(v: string, ghaNoCache?: boolean): Promise<string> {
51+
public async download(v: string, ghaNoCache?: boolean, skipState?: boolean): Promise<string> {
5252
const version: DownloadVersion = await Install.getDownloadVersion(v);
5353
core.debug(`Install.download version: ${version.version}`);
5454

@@ -83,12 +83,12 @@ export class Install {
8383
const htcDownloadPath = await tc.downloadTool(downloadURL, undefined, this.githubToken);
8484
core.debug(`Install.download htcDownloadPath: ${htcDownloadPath}`);
8585

86-
const cacheSavePath = await installCache.save(htcDownloadPath);
86+
const cacheSavePath = await installCache.save(htcDownloadPath, skipState);
8787
core.info(`Cached to ${cacheSavePath}`);
8888
return cacheSavePath;
8989
}
9090

91-
public async build(gitContext: string, ghaNoCache?: boolean): Promise<string> {
91+
public async build(gitContext: string, ghaNoCache?: boolean, skipState?: boolean): Promise<string> {
9292
const vspec = await this.vspec(gitContext);
9393
core.debug(`Install.build vspec: ${vspec}`);
9494

@@ -119,7 +119,7 @@ export class Install {
119119
return `${outputDir}/cosign`;
120120
});
121121

122-
const cacheSavePath = await installCache.save(buildBinPath);
122+
const cacheSavePath = await installCache.save(buildBinPath, skipState);
123123
core.info(`Cached to ${cacheSavePath}`);
124124
return cacheSavePath;
125125
}
@@ -139,7 +139,7 @@ export class Install {
139139
fs.chmodSync(cosignPath, '0755');
140140

141141
core.addPath(binDir);
142-
core.info('Added Unodck to PATH');
142+
core.info('Added Cosign to PATH');
143143

144144
core.info(`Binary path: ${cosignPath}`);
145145
return cosignPath;

src/undock/install.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class Install {
7171

7272
const cacheFoundPath = await installCache.find();
7373
if (cacheFoundPath) {
74-
core.info(`Unodck binary found in ${cacheFoundPath}`);
74+
core.info(`Undock binary found in ${cacheFoundPath}`);
7575
return cacheFoundPath;
7676
}
7777

@@ -112,7 +112,7 @@ export class Install {
112112
fs.chmodSync(undockPath, '0755');
113113

114114
core.addPath(binDir);
115-
core.info('Added Unodck to PATH');
115+
core.info('Added Undock to PATH');
116116

117117
core.info(`Binary path: ${undockPath}`);
118118
return undockPath;

0 commit comments

Comments
 (0)