Skip to content

Commit 82faacd

Browse files
committed
20220910C
1 parent fec62e2 commit 82faacd

File tree

13 files changed

+69
-56
lines changed

13 files changed

+69
-56
lines changed

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper/artifact/download-all.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22
import { create as ghactionsArtifact } from "@actions/artifact";
33
const input = JSON.parse(process.argv[2]);
4-
const result = await ghactionsArtifact().downloadAllArtifacts(input.Destination).catch((reason) => {
5-
console.error(reason);
6-
return process.exit(1);
7-
});
4+
const result = await ghactionsArtifact().downloadAllArtifacts(input.Destination)
5+
.catch((reason) => {
6+
console.error(reason);
7+
return process.exit(1);
8+
});
89
console.log(process.argv[3]);
910
let outputObject = [];
1011
for (let item of result) {

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper/artifact/download.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22
import { create as ghactionsArtifact } from "@actions/artifact";
33
const input = JSON.parse(process.argv[2]);
4-
const result = await ghactionsArtifact().downloadArtifact(input.Name, input.Destination, { createArtifactFolder: input.CreateSubfolder }).catch((reason) => {
5-
console.error(reason);
6-
return process.exit(1);
7-
});
4+
const result = await ghactionsArtifact().downloadArtifact(input.Name, input.Destination, { createArtifactFolder: input.CreateSubfolder })
5+
.catch((reason) => {
6+
console.error(reason);
7+
return process.exit(1);
8+
});
89
console.log(process.argv[3]);
910
console.log(JSON.stringify({
1011
Name: result.artifactName,

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper/artifact/upload.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ const input = JSON.parse(process.argv[2]);
44
const result = await ghactionsArtifact().uploadArtifact(input.Name, input.Path, input.BaseRoot, {
55
continueOnError: input.ContinueOnIssue,
66
retentionDays: input.RetentionTime
7-
}).catch((reason) => {
8-
console.error(reason);
9-
return process.exit(1);
10-
});
7+
})
8+
.catch((reason) => {
9+
console.error(reason);
10+
return process.exit(1);
11+
});
1112
console.log(process.argv[3]);
1213
console.log(JSON.stringify({
13-
Name: result.artifactName,
14+
FailedItem: result.failedItems,
15+
FailedItems: result.failedItems,
1416
Item: result.artifactItems,
1517
Items: result.artifactItems,
18+
Name: result.artifactName,
1619
Size: result.size,
17-
Sizes: result.size,
18-
FailedItem: result.failedItems,
19-
FailedItems: result.failedItems
20+
Sizes: result.size
2021
}));
2122
process.exit(0);

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper/cache/restore.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ const result = await ghactionsCacheRestoreCache(input.Path, input.PrimaryKey, in
55
downloadConcurrency: input.DownloadConcurrency,
66
timeoutInMs: input.Timeout,
77
useAzureSdk: input.UseAzureSdk
8-
}).catch((reason) => {
9-
console.error(reason);
10-
return process.exit(1);
11-
});
8+
})
9+
.catch((reason) => {
10+
console.error(reason);
11+
return process.exit(1);
12+
});
1213
console.log(process.argv[3]);
1314
console.log(JSON.stringify({ CacheKey: result }));
1415
process.exit(0);

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper/cache/save.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ const input = JSON.parse(process.argv[2]);
44
const result = await ghactionsCacheSaveCache(input.Path, input.Key, {
55
uploadChunkSize: input.UploadChunkSizes,
66
uploadConcurrency: input.UploadConcurrency
7-
}).catch((reason) => {
8-
console.error(reason);
9-
return process.exit(1);
10-
});
7+
})
8+
.catch((reason) => {
9+
console.error(reason);
10+
return process.exit(1);
11+
});
1112
console.log(process.argv[3]);
1213
console.log(JSON.stringify({ CacheId: result }));
1314
process.exit(0);
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22
import { getIDToken as ghactionsGetOpenIDConnectToken } from "@actions/core";
33
const input = JSON.parse(process.argv[2]);
4-
const result = await ghactionsGetOpenIDConnectToken(input.Audience).catch((reason) => {
5-
console.error(reason);
6-
return process.exit(1);
7-
});
4+
const result = await ghactionsGetOpenIDConnectToken(input.Audience)
5+
.catch((reason) => {
6+
console.error(reason);
7+
return process.exit(1);
8+
});
89
console.log(process.argv[3]);
910
console.log(JSON.stringify({ Token: result }));
1011
process.exit(0);
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22
import { cacheDir as ghactionsToolCacheCacheDirectory } from "@actions/tool-cache";
33
const input = JSON.parse(process.argv[2]);
4-
const result = await ghactionsToolCacheCacheDirectory(input.Source, input.Name, input.Version, input.Architecture).catch((reason) => {
5-
console.error(reason);
6-
return process.exit(1);
7-
});
4+
const result = await ghactionsToolCacheCacheDirectory(input.Source, input.Name, input.Version, input.Architecture)
5+
.catch((reason) => {
6+
console.error(reason);
7+
return process.exit(1);
8+
});
89
console.log(process.argv[3]);
910
console.log(JSON.stringify({ Path: result }));
1011
process.exit(0);
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22
import { cacheFile as ghactionsToolCacheCacheFile } from "@actions/tool-cache";
33
const input = JSON.parse(process.argv[2]);
4-
const result = await ghactionsToolCacheCacheFile(input.Source, input.Target, input.Name, input.Version, input.Architecture).catch((reason) => {
5-
console.error(reason);
6-
return process.exit(1);
7-
});
4+
const result = await ghactionsToolCacheCacheFile(input.Source, input.Target, input.Name, input.Version, input.Architecture)
5+
.catch((reason) => {
6+
console.error(reason);
7+
return process.exit(1);
8+
});
89
console.log(process.argv[3]);
910
console.log(JSON.stringify({ Path: result }));
1011
process.exit(0);
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22
import { downloadTool as ghactionToolCacheDownloadTool } from "@actions/tool-cache";
33
const input = JSON.parse(process.argv[2]);
4-
const result = await ghactionToolCacheDownloadTool(input.Uri, input.Destination, input.Authorization, input.Header).catch((reason) => {
5-
console.error(reason);
6-
return process.exit(1);
7-
});
4+
const result = await ghactionToolCacheDownloadTool(input.Uri, input.Destination, input.Authorization, input.Header)
5+
.catch((reason) => {
6+
console.error(reason);
7+
return process.exit(1);
8+
});
89
console.log(process.argv[3]);
910
console.log(JSON.stringify({ Path: result }));
1011
process.exit(0);
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env node
22
import { extract7z as ghactionToolCacheExtract7z } from "@actions/tool-cache";
33
const input = JSON.parse(process.argv[2]);
4-
const result = await ghactionToolCacheExtract7z(input.File, input.Destination, input["7zrPath"]).catch((reason) => {
5-
console.error(reason);
6-
return process.exit(1);
7-
});
4+
const result = await ghactionToolCacheExtract7z(input.File, input.Destination, input["7zrPath"])
5+
.catch((reason) => {
6+
console.error(reason);
7+
return process.exit(1);
8+
});
89
console.log(process.argv[3]);
910
console.log(JSON.stringify({ Path: result }));
1011
process.exit(0);

0 commit comments

Comments
 (0)