Skip to content

Commit e949ea0

Browse files
author
Dan Clayton
committed
test
1 parent 5903aa5 commit e949ea0

55 files changed

Lines changed: 2466 additions & 3852 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dotgithub.json

Lines changed: 103 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,112 @@
22
"version": "1.0.0",
33
"outputDir": "src",
44
"actions": [
5+
{
6+
"orgRepo": "actions/cache",
7+
"ref": "0400d5f644dc74513175e3cd8d07132dd4860809",
8+
"versionRef": "v4",
9+
"functionName": "cache",
10+
"outputPath": "actions/actions/cache/cache.ts"
11+
},
12+
{
13+
"orgRepo": "actions/cache",
14+
"ref": "0400d5f644dc74513175e3cd8d07132dd4860809",
15+
"versionRef": "v4",
16+
"functionName": "restoreCache",
17+
"outputPath": "actions/actions/cache/restore/restore-cache.ts",
18+
"actionPath": "restore"
19+
},
20+
{
21+
"orgRepo": "actions/cache",
22+
"ref": "0400d5f644dc74513175e3cd8d07132dd4860809",
23+
"versionRef": "v4",
24+
"functionName": "saveACache",
25+
"outputPath": "actions/actions/cache/save/save-a-cache.ts",
26+
"actionPath": "save"
27+
},
528
{
629
"orgRepo": "actions/checkout",
7-
"ref": "08c6903cd8c0fde910a37f88322edcfb5dd907a8",
8-
"versionRef": "v5",
30+
"ref": "08eba0b27e820071cde6df949e0beb9ba4906955",
31+
"versionRef": "v4",
932
"functionName": "checkout",
10-
"outputPath": "../../actions/actions/checkout.ts"
33+
"outputPath": "actions/actions/checkout.ts"
34+
},
35+
{
36+
"orgRepo": "actions/setup-node",
37+
"ref": "55YtaEqYEUM7ASAZ9XmVdSBNy6F7r5zkdLsJFv2ZPtAx0020",
38+
"versionRef": "v4",
39+
"functionName": "setupNodeJsEnvironment",
40+
"outputPath": "actions/actions/setup-node.ts"
41+
},
42+
{
43+
"orgRepo": "actions/upload-artifact",
44+
"ref": "ea165f8d65b6e75b540449e92b4886f43607fa02",
45+
"versionRef": "v4",
46+
"functionName": "uploadABuildArtifact",
47+
"outputPath": "actions/actions/upload-artifact/upload-a-build-artifact.ts"
48+
},
49+
{
50+
"orgRepo": "actions/upload-artifact",
51+
"ref": "ea165f8d65b6e75b540449e92b4886f43607fa02",
52+
"versionRef": "v4",
53+
"functionName": "mergeBuildArtifacts",
54+
"outputPath": "actions/actions/upload-artifact/merge/merge-build-artifacts.ts",
55+
"actionPath": "merge"
56+
},
57+
{
58+
"orgRepo": "github/codeql-action",
59+
"ref": "528ca598d956c91826bd742262cdfc5d02b77710",
60+
"versionRef": "v3",
61+
"functionName": "codeQLStub",
62+
"outputPath": "actions/github/codeql-action/codeql-stub.ts"
63+
},
64+
{
65+
"orgRepo": "github/codeql-action",
66+
"ref": "528ca598d956c91826bd742262cdfc5d02b77710",
67+
"versionRef": "v3",
68+
"functionName": "codeQLFinish",
69+
"outputPath": "actions/github/codeql-action/analyze/codeql-finish.ts",
70+
"actionPath": "analyze"
71+
},
72+
{
73+
"orgRepo": "github/codeql-action",
74+
"ref": "528ca598d956c91826bd742262cdfc5d02b77710",
75+
"versionRef": "v3",
76+
"functionName": "codeQLAutobuild",
77+
"outputPath": "actions/github/codeql-action/autobuild/codeql-autobuild.ts",
78+
"actionPath": "autobuild"
79+
},
80+
{
81+
"orgRepo": "github/codeql-action",
82+
"ref": "528ca598d956c91826bd742262cdfc5d02b77710",
83+
"versionRef": "v3",
84+
"functionName": "codeQLInit",
85+
"outputPath": "actions/github/codeql-action/init/codeql-init.ts",
86+
"actionPath": "init"
87+
},
88+
{
89+
"orgRepo": "github/codeql-action",
90+
"ref": "528ca598d956c91826bd742262cdfc5d02b77710",
91+
"versionRef": "v3",
92+
"functionName": "codeQLResolveBuildEnvironment",
93+
"outputPath": "actions/github/codeql-action/resolve-environment/codeql-resolve-build-environment.ts",
94+
"actionPath": "resolve-environment"
95+
},
96+
{
97+
"orgRepo": "github/codeql-action",
98+
"ref": "528ca598d956c91826bd742262cdfc5d02b77710",
99+
"versionRef": "v3",
100+
"functionName": "codeQLStartProxy",
101+
"outputPath": "actions/github/codeql-action/start-proxy/codeql-start-proxy.ts",
102+
"actionPath": "start-proxy"
103+
},
104+
{
105+
"orgRepo": "github/codeql-action",
106+
"ref": "528ca598d956c91826bd742262cdfc5d02b77710",
107+
"versionRef": "v3",
108+
"functionName": "codeScanningUploadSARIF",
109+
"outputPath": "actions/github/codeql-action/upload-sarif/code-scanning-upload-sarif.ts",
110+
"actionPath": "upload-sarif"
11111
}
12112
],
13113
"plugins": [

src/actions/cache.ts renamed to .github/src/actions/actions/cache/cache.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
import { createStep } from "@dotgithub/core";
2-
import type { GitHubStep, GitHubStepBase } from "@dotgithub/core";
2+
import type {
3+
GitHubStep,
4+
GitHubStepBase,
5+
GitHubActionInputValue,
6+
} from "@dotgithub/core";
37

48
export type CacheInputs = {
59
/** A list of files, directories, and wildcard patterns to cache and restore */
6-
path: string;
10+
path: GitHubActionInputValue;
711
/** An explicit key for restoring and saving the cache */
8-
key: string;
12+
key: GitHubActionInputValue;
913
/** An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. */
10-
"restore-keys"?: string;
14+
"restore-keys"?: GitHubActionInputValue;
1115
/** The chunk size used to split up large files during upload, in bytes */
12-
"upload-chunk-size"?: string;
16+
"upload-chunk-size"?: GitHubActionInputValue;
1317
/** An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms | default: "false" */
14-
enableCrossOsArchive?: string;
18+
enableCrossOsArchive?: GitHubActionInputValue;
1519
/** Fail the workflow if cache entry is not found | default: "false" */
16-
"fail-on-cache-miss"?: string;
20+
"fail-on-cache-miss"?: GitHubActionInputValue;
1721
/** Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | default: "false" */
18-
"lookup-only"?: string;
22+
"lookup-only"?: GitHubActionInputValue;
1923
/** Run the post step to save the cache even if another step before fails | default: "false" */
20-
"save-always"?: string;
24+
"save-always"?: GitHubActionInputValue;
2125
};
2226
export type CacheOutputs = {
2327
/** A boolean value to indicate an exact match was found for the primary key */
2428
"cache-hit": string;
2529
};
2630
/**
2731
Cache artifacts like dependencies and build outputs to improve workflow execution time
32+
2833
https://github.com/actions/cache/tree/v4
2934
*/
3035
export function cache(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from "./cache";
2+
export * from "./save/save-a-cache";
3+
export * from "./restore/restore-cache";
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { createStep } from "@dotgithub/core";
2+
import type {
3+
GitHubStep,
4+
GitHubStepBase,
5+
GitHubActionInputValue,
6+
} from "@dotgithub/core";
7+
8+
export type RestoreCacheInputs = {
9+
/** A list of files, directories, and wildcard patterns to restore */
10+
path: GitHubActionInputValue;
11+
/** An explicit key for restoring the cache */
12+
key: GitHubActionInputValue;
13+
/** An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. */
14+
"restore-keys"?: GitHubActionInputValue;
15+
/** An optional boolean when enabled, allows windows runners to restore caches that were saved on other platforms | default: "false" */
16+
enableCrossOsArchive?: GitHubActionInputValue;
17+
/** Fail the workflow if cache entry is not found | default: "false" */
18+
"fail-on-cache-miss"?: GitHubActionInputValue;
19+
/** Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | default: "false" */
20+
"lookup-only"?: GitHubActionInputValue;
21+
};
22+
export type RestoreCacheOutputs = {
23+
/** A boolean value to indicate an exact match was found for the primary key */
24+
"cache-hit": string;
25+
/** A resolved cache key for which cache match was attempted */
26+
"cache-primary-key": string;
27+
/** Key of the cache that was restored, it could either be the primary key on cache-hit or a partial/complete match of one of the restore keys */
28+
"cache-matched-key": string;
29+
};
30+
/**
31+
Restore Cache artifacts like dependencies and build outputs to improve workflow execution time
32+
33+
https://github.com/actions/cache/restore/tree/v4
34+
*/
35+
export function restoreCache(
36+
inputs: RestoreCacheInputs,
37+
step?: Partial<GitHubStepBase>,
38+
ref?: string,
39+
): GitHubStep<RestoreCacheInputs> {
40+
return createStep(
41+
"actions/cache/restore",
42+
{ ...step, with: inputs },
43+
ref ?? "0400d5f644dc74513175e3cd8d07132dd4860809",
44+
);
45+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { createStep } from "@dotgithub/core";
2+
import type {
3+
GitHubStep,
4+
GitHubStepBase,
5+
GitHubActionInputValue,
6+
} from "@dotgithub/core";
7+
8+
export type SaveACacheInputs = {
9+
/** A list of files, directories, and wildcard patterns to cache */
10+
path: GitHubActionInputValue;
11+
/** An explicit key for saving the cache */
12+
key: GitHubActionInputValue;
13+
/** The chunk size used to split up large files during upload, in bytes */
14+
"upload-chunk-size"?: GitHubActionInputValue;
15+
/** An optional boolean when enabled, allows windows runners to save caches that can be restored on other platforms | default: "false" */
16+
enableCrossOsArchive?: GitHubActionInputValue;
17+
};
18+
/**
19+
Save Cache artifacts like dependencies and build outputs to improve workflow execution time
20+
21+
https://github.com/actions/cache/save/tree/v4
22+
*/
23+
export function saveACache(
24+
inputs: SaveACacheInputs,
25+
step?: Partial<GitHubStepBase>,
26+
ref?: string,
27+
): GitHubStep<SaveACacheInputs> {
28+
return createStep(
29+
"actions/cache/save",
30+
{ ...step, with: inputs },
31+
ref ?? "0400d5f644dc74513175e3cd8d07132dd4860809",
32+
);
33+
}

.github/src/actions/actions/checkout.ts

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export * from "./checkout.js";
1+
export * as uploadArtifact from "./upload-artifact/index.js";
2+
export * as cache from "./cache/index.js";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./upload-a-build-artifact";
2+
export * from "./merge/merge-build-artifacts";

0 commit comments

Comments
 (0)