@docker/actions-toolkit 0.1.0-beta.1 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/lib/builder.d.ts +15 -0
- package/lib/builder.js +15 -0
- package/lib/builder.js.map +1 -1
- package/lib/buildkit.d.ts +15 -0
- package/lib/buildkit.js +15 -0
- package/lib/buildkit.js.map +1 -1
- package/lib/buildx.d.ts +24 -2
- package/lib/buildx.js +55 -16
- package/lib/buildx.js.map +1 -1
- package/lib/context.d.ts +15 -0
- package/lib/context.js +15 -0
- package/lib/context.js.map +1 -1
- package/lib/docker.d.ts +15 -0
- package/lib/docker.js +15 -0
- package/lib/docker.js.map +1 -1
- package/lib/git.d.ts +15 -0
- package/lib/git.js +15 -0
- package/lib/git.js.map +1 -1
- package/lib/github.d.ts +15 -0
- package/lib/github.js +15 -0
- package/lib/github.js.map +1 -1
- package/lib/toolkit.d.ts +15 -0
- package/lib/toolkit.js +15 -0
- package/lib/toolkit.js.map +1 -1
- package/lib/util.d.ts +15 -0
- package/lib/util.js +15 -0
- package/lib/util.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
1
|
# Actions Toolkit
|
|
2
2
|
|
|
3
3
|
Toolkit for Docker (GitHub) Actions.
|
|
4
|
+
|
|
5
|
+
## :test_tube: Experimental
|
|
6
|
+
|
|
7
|
+
This repository is considered **EXPERIMENTAL** and under active development
|
|
8
|
+
until further notice. It is subject to non-backward compatible changes or
|
|
9
|
+
removal in any future version.
|
|
10
|
+
|
|
11
|
+
## About
|
|
12
|
+
|
|
13
|
+
This repository contains the source code for the toolkit that is consumed as
|
|
14
|
+
a library by most of our GitHub Actions:
|
|
15
|
+
|
|
16
|
+
* [docker/bake-action](https://github.com/docker/bake-action)
|
|
17
|
+
* [docker/build-push-action](https://github.com/docker/build-push-action)
|
|
18
|
+
* [docker/login-action](https://github.com/docker/login-action)
|
|
19
|
+
* [docker/metadata-action](https://github.com/docker/metadata-action)
|
|
20
|
+
* [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action)
|
|
21
|
+
* [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action)
|
|
22
|
+
|
|
23
|
+
This toolkit provides some utilities and common logic when developing GitHub
|
|
24
|
+
Actions and also acts as a minimal wrapper around our build tooling such as
|
|
25
|
+
[Buildx](https://github.com/docker/buildx) and [BuildKit](https://github.com/moby/buildkit)
|
|
26
|
+
and provides an easier API for interacting with them.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```console
|
|
31
|
+
$ npm install @docker/actions-toolkit
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
const { Toolkit } = require('@docker/actions-toolkit')
|
|
38
|
+
const toolkit = new Toolkit()
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Contributing
|
|
42
|
+
|
|
43
|
+
Want to contribute to the Actions Toolkit? Awesome! You can find information
|
|
44
|
+
about contributing to this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
|
package/lib/builder.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { Buildx } from './buildx';
|
|
2
17
|
import { Context } from './context';
|
|
3
18
|
export interface BuilderInfo {
|
package/lib/builder.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/builder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,qCAAgC;AAyBhC,MAAa,OAAO;IAIlB,YAAY,IAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,MAAM;YACT,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM;gBAC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I,CAAC,eAAe,GAAG,KAAK,CAAC;oBAC7B,MAAM;iBACP;gBACD,KAAK,WAAW,CAAC,CAAC;oBAChB,IAAI,SAAS,GAAkB,EAAE,CAAC;oBAClC,2DAA2D;oBAC3D,gHAAgH;oBAChH,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;wBACvB,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;4BACxC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gCAC1B,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;6BAC3C;yBACF;qBACF;yBAAM;wBACL,wCAAwC;wBACxC,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;qBAC/B;oBACD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBACrC,MAAM;iBACP;aACF;SACF;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAChC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1B;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAxGD,0BAwGC"}
|
package/lib/buildkit.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { Context } from './context';
|
|
2
17
|
import { Buildx } from './buildx';
|
|
3
18
|
export interface BuildKitOpts {
|
package/lib/buildkit.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/buildkit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildkit.js","sourceRoot":"","sources":["../src/buildkit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"buildkit.js","sourceRoot":"","sources":["../src/buildkit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,oDAAsC;AACtC,oDAAsC;AACtC,+CAAiC;AAGjC,qCA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AE,OAAO,EAAC,CAAC,CAAC;SAC7C;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAC,CAAC,CAAC;QACzE,YAAE,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAChC,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AA7GD,4BA6GC"}
|
package/lib/buildx.d.ts
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { Context } from './context';
|
|
17
|
+
export interface GitHubRelease {
|
|
18
|
+
id: number;
|
|
19
|
+
tag_name: string;
|
|
20
|
+
html_url: string;
|
|
21
|
+
assets: Array<string>;
|
|
22
|
+
}
|
|
2
23
|
export interface BuildxOpts {
|
|
3
24
|
context: Context;
|
|
4
25
|
standalone?: boolean;
|
|
5
26
|
}
|
|
6
27
|
export declare class Buildx {
|
|
7
28
|
private readonly context;
|
|
29
|
+
private _version;
|
|
8
30
|
standalone: boolean;
|
|
9
|
-
version: Promise<string>;
|
|
10
31
|
constructor(opts: BuildxOpts);
|
|
11
32
|
getCommand(args: Array<string>): {
|
|
12
33
|
command: string;
|
|
@@ -14,7 +35,7 @@ export declare class Buildx {
|
|
|
14
35
|
};
|
|
15
36
|
isAvailable(): Promise<boolean>;
|
|
16
37
|
printInspect(name: string): Promise<void>;
|
|
17
|
-
|
|
38
|
+
get version(): Promise<string | undefined>;
|
|
18
39
|
printVersion(): Promise<void>;
|
|
19
40
|
static parseVersion(stdout: string): string;
|
|
20
41
|
versionSatisfies(range: string, version?: string): Promise<boolean>;
|
|
@@ -28,6 +49,7 @@ export declare class Buildx {
|
|
|
28
49
|
generateBuildSecret(kvp: string, file: boolean): string;
|
|
29
50
|
getProvenanceInput(name: string): string;
|
|
30
51
|
getProvenanceAttrs(input: string): string;
|
|
52
|
+
static getRelease(version: string): Promise<GitHubRelease>;
|
|
31
53
|
static hasLocalExporter(exporters: string[]): boolean;
|
|
32
54
|
static hasTarExporter(exporters: string[]): boolean;
|
|
33
55
|
static hasDockerExporter(exporters: string[], load?: boolean): boolean;
|
package/lib/buildx.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -40,6 +55,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
40
55
|
const path_1 = __importDefault(require("path"));
|
|
41
56
|
const core = __importStar(require("@actions/core"));
|
|
42
57
|
const exec = __importStar(require("@actions/exec"));
|
|
58
|
+
const httpm = __importStar(require("@actions/http-client"));
|
|
43
59
|
const sync_1 = require("csv-parse/sync");
|
|
44
60
|
const semver = __importStar(require("semver"));
|
|
45
61
|
const docker_1 = require("./docker");
|
|
@@ -48,7 +64,6 @@ class Buildx {
|
|
|
48
64
|
var _a;
|
|
49
65
|
this.context = opts.context;
|
|
50
66
|
this.standalone = (_a = opts === null || opts === void 0 ? void 0 : opts.standalone) !== null && _a !== void 0 ? _a : !docker_1.Docker.isAvailable();
|
|
51
|
-
this.version = this.getVersion();
|
|
52
67
|
}
|
|
53
68
|
getCommand(args) {
|
|
54
69
|
return {
|
|
@@ -84,21 +99,24 @@ class Buildx {
|
|
|
84
99
|
});
|
|
85
100
|
});
|
|
86
101
|
}
|
|
87
|
-
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
get version() {
|
|
103
|
+
return (() => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
if (!this._version) {
|
|
105
|
+
const cmd = this.getCommand(['version']);
|
|
106
|
+
this._version = yield exec
|
|
107
|
+
.getExecOutput(cmd.command, cmd.args, {
|
|
108
|
+
ignoreReturnCode: true,
|
|
109
|
+
silent: true
|
|
110
|
+
})
|
|
111
|
+
.then(res => {
|
|
112
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
113
|
+
throw new Error(res.stderr.trim());
|
|
114
|
+
}
|
|
115
|
+
return Buildx.parseVersion(res.stdout.trim());
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return this._version;
|
|
119
|
+
}))();
|
|
102
120
|
}
|
|
103
121
|
printVersion() {
|
|
104
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -118,6 +136,9 @@ class Buildx {
|
|
|
118
136
|
versionSatisfies(range, version) {
|
|
119
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
120
138
|
const ver = version !== null && version !== void 0 ? version : (yield this.version);
|
|
139
|
+
if (!ver) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
121
142
|
return semver.satisfies(ver, range) || /^[0-9a-f]{7}$/.exec(ver) !== null;
|
|
122
143
|
});
|
|
123
144
|
}
|
|
@@ -216,6 +237,24 @@ class Buildx {
|
|
|
216
237
|
// if not add builder-id attribute
|
|
217
238
|
return `${input},builder-id=${this.context.provenanceBuilderID}`;
|
|
218
239
|
}
|
|
240
|
+
static getRelease(version) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
// FIXME: Use https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json when repo public
|
|
243
|
+
const url = `https://raw.githubusercontent.com/docker/buildx/master/.github/releases.json`;
|
|
244
|
+
const http = new httpm.HttpClient('docker-actions-toolkit');
|
|
245
|
+
const resp = yield http.get(url);
|
|
246
|
+
const body = yield resp.readBody();
|
|
247
|
+
const statusCode = resp.message.statusCode || 500;
|
|
248
|
+
if (statusCode >= 400) {
|
|
249
|
+
throw new Error(`Failed to get Buildx release ${version} from ${url} with status code ${statusCode}: ${body}`);
|
|
250
|
+
}
|
|
251
|
+
const releases = JSON.parse(body);
|
|
252
|
+
if (!releases[version]) {
|
|
253
|
+
throw new Error(`Cannot find Buildx release ${version} in ${url}`);
|
|
254
|
+
}
|
|
255
|
+
return releases[version];
|
|
256
|
+
});
|
|
257
|
+
}
|
|
219
258
|
static hasLocalExporter(exporters) {
|
|
220
259
|
return Buildx.hasExporterType('local', exporters);
|
|
221
260
|
}
|
package/lib/buildx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildx.js","sourceRoot":"","sources":["../src/buildx.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"buildx.js","sourceRoot":"","sources":["../src/buildx.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,gDAAwB;AACxB,oDAAsC;AACtC,oDAAsC;AACtC,4DAA8C;AAC9C,yCAAqC;AACrC,+CAAiC;AAEjC,qCAAgC;AAehC,MAAa,MAAM;IAMjB,YAAY,IAAgB;;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,mCAAI,CAAC,eAAM,CAAC,WAAW,EAAE,CAAC;IAC9D,CAAC;IAEM,UAAU,CAAC,IAAmB;QACnC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;YAC9C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC;SACnD,CAAC;IACJ,CAAC;IAEY,WAAW;;YACtB,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAChC,OAAO,MAAM,IAAI;iBACd,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE;gBACpC,gBAAgB,EAAE,IAAI;gBACtB,MAAM,EAAE,IAAI;aACb,CAAC;iBACD,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,IAAI,CAAC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AO,CAAC,EAAE;gBACxD,8BAA8B;gBAC9B,yGAAyG;gBACzG,OAAO,IAAI,IAAI,OAAO,CAAC;aACxB;YACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;gBACzF,IAAI,GAAG,IAAI,MAAM,IAAI,KAAK,IAAI,IAAI,EAAE;oBAClC,OAAO,IAAI,CAAC;iBACb;aACF;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,MAAM,CAAC,qBAAqB,CAAC,OAAiB;QACnD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC5B,IAAI,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE;gBACxC,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA1PD,wBA0PC"}
|
package/lib/context.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import * as tmp from 'tmp';
|
|
2
17
|
export declare class Context {
|
|
3
18
|
gitRef: string;
|
package/lib/context.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,yCAA2B;AAC3B,wDAA0C;AAE1C,qCAAgC;AAEhC,MAAa,OAAO;IAOlB;QAFiB,YAAO,GAAG,YAAE,CAAC,WAAW,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC,cAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,cA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"License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export declare class Docker {
|
|
2
17
|
static isAvailable(): boolean;
|
|
3
18
|
static printVersion(standalone?: boolean): Promise<void>;
|
package/lib/docker.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/docker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.js","sourceRoot":"","sources":["../src/docker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AO;aACR;YACD,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE;gBAClC,YAAY,EAAE,KAAK;aACpB,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAzCD,wBAyCC"}
|
package/lib/git.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export declare class Git {
|
|
2
17
|
static getRemoteSha(repo: string, ref: string): Promise<string>;
|
|
3
18
|
}
|
package/lib/git.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,MAAa,GAAG;IACP,MAAM,CAAO,YAAY,CAAC,IAAY,EAAE,GAAW;;YACxD,OAAO,MAAM,IAAI;iBACd,aAAa,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE;gBAC9C,gBAAgB,EAAE,IAAI;gBACtB,MAAM,EAAE,IAAI;aACb,CAAC;iBACD,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,IAAI,CAAC,EAAE;oBAC9C,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBAC7B;gBACD,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;gBACjD,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;oBACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC;iBAC9D;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACF;AAlBD,kBAkBC"}
|
package/lib/github.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { GitHub as Octokit } from '@actions/github/lib/utils';
|
|
2
17
|
import { components as OctoOpenApiTypes } from '@octokit/openapi-types';
|
|
3
18
|
import { JwtPayload } from 'jwt-decode';
|
package/lib/github.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/github.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,wDAA0C;AAE1C,4DAAkD;AAalD,MAAa,MAAM;IAIjB,YAAY,IAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,OAAO;QACT,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,oBAAoB,CAAC;IAC/D,CAAC;IAED,IAAI,mBAAmB;QACrB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC;QACzD,OAAO,KAAK,CAAC,CAAC,CAAC,IAAA,oBAAU,EAA4B,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnE,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,mBAAK,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAkB,CAAC,CAAC;IAC7G,CAAC;;AAvBH,wBAwBC;AAvBwB,gBAAS,GAAW,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,oBAAoB,CAAC"}
|
package/lib/toolkit.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
import { Context } from './context';
|
|
2
17
|
import { Buildx } from './buildx';
|
|
3
18
|
import { BuildKit } from './buildkit';
|
package/lib/toolkit.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.Toolkit = exports.Util = exports.GitHub = exports.Git = exports.Docker = exports.Context = exports.Buildx = exports.BuildKit = exports.Builder = void 0;
|
|
4
19
|
const context_1 = require("./context");
|
package/lib/toolkit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolkit.js","sourceRoot":"","sources":["../src/toolkit.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"toolkit.js","sourceRoot":"","sources":["../src/toolkit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uCAAkC;AAClC,qCAAgC;AAChC,yCAAoC;AACpC,qCAAgC;AAEhC,qCAAsE;AAA9D,kGAAA,OAAO,OAAA;AACf,uCAAkD;AAA1C,oGAAA,QAAQ,OAAA;AAChB,mCAA4C;AAApC,gGAAA,MAAM,OAAA;AACd,qCAAkC;AAA1B,kGAAA,OAAO,OAAA;AACf,mCAAgC;AAAxB,gGAAA,MAAM,OAAA;AACd,6BAA0B;AAAlB,0FAAA,GAAG,OAAA;AACX,mCAAuE;AAA/D,gGAAA,MAAM,OAAA;AACd,+BAA4B;AAApB,4FAAA,IAAI,OAAA;AAUZ,MAAa,OAAO;IAMlB,YAAY,OAAoB,EAAE;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAC,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;IAC7E,CAAC;CACF;AAZD,0BAYC"}
|
package/lib/util.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export declare class Util {
|
|
2
17
|
static getInputList(name: string, ignoreComma?: boolean): string[];
|
|
3
18
|
static asyncForEach(array: any, callback: any): Promise<void>;
|
package/lib/util.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
18
|
if (k2 === undefined) k2 = k;
|
|
4
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBACjD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;aAC5C;QACH,CAAC;KAAA;IAEM,MAAM,CAAC,UAAU,CAAC,GAAW;QAClC,IAAI;YACF,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;SACd;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,KAAK,CAAC;SACd;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA7CD,oBA6CC"}
|
package/package.json
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@actions/core": "^1.10.0",
|
|
41
41
|
"@actions/exec": "^1.1.1",
|
|
42
42
|
"@actions/github": "^5.1.1",
|
|
43
|
+
"@actions/http-client": "^2.0.1",
|
|
43
44
|
"csv-parse": "^5.3.3",
|
|
44
45
|
"jwt-decode": "^3.1.2",
|
|
45
46
|
"semver": "^7.3.8",
|
|
@@ -65,5 +66,5 @@
|
|
|
65
66
|
"ts-node": "^10.9.1",
|
|
66
67
|
"typescript": "^4.9.4"
|
|
67
68
|
},
|
|
68
|
-
"version": "0.1.0-beta.
|
|
69
|
+
"version": "0.1.0-beta.2"
|
|
69
70
|
}
|