@docker/actions-toolkit 0.1.0-beta.1 → 0.1.0-beta.11
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 +46 -0
- package/lib/buildkit/buildkit.d.ts +32 -0
- package/lib/{buildkit.js → buildkit/buildkit.js} +33 -44
- package/lib/buildkit/buildkit.js.map +1 -0
- package/lib/buildkit/config.d.ts +23 -0
- package/lib/buildkit/config.js +46 -0
- package/lib/buildkit/config.js.map +1 -0
- package/lib/buildx/builder.d.ts +29 -0
- package/lib/{builder.js → buildx/builder.js} +16 -1
- package/lib/buildx/builder.js.map +1 -0
- package/lib/buildx/buildx.d.ts +44 -0
- package/lib/buildx/buildx.js +206 -0
- package/lib/buildx/buildx.js.map +1 -0
- package/lib/buildx/inputs.d.ts +35 -0
- package/lib/{buildx.js → buildx/inputs.js} +35 -106
- package/lib/buildx/inputs.js.map +1 -0
- package/lib/buildx/install.d.ts +36 -0
- package/lib/buildx/install.js +268 -0
- package/lib/buildx/install.js.map +1 -0
- 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 +21 -1
- package/lib/docker.js +57 -20
- package/lib/docker.js.map +1 -1
- package/lib/dockerhub.d.ts +31 -0
- package/lib/dockerhub.js +156 -0
- package/lib/dockerhub.js.map +1 -0
- 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 +21 -10
- package/lib/github.js +72 -7
- package/lib/github.js.map +1 -1
- package/lib/toolkit.d.ts +21 -10
- package/lib/toolkit.js +22 -19
- package/lib/toolkit.js.map +1 -1
- package/lib/types/builder.d.ts +37 -0
- package/lib/types/builder.js +18 -0
- package/lib/types/builder.js.map +1 -0
- package/lib/types/buildx.d.ts +20 -0
- package/lib/types/buildx.js +18 -0
- package/lib/types/buildx.js.map +1 -0
- package/lib/types/dockerhub.d.ts +104 -0
- package/lib/types/dockerhub.js +18 -0
- package/lib/types/dockerhub.js.map +1 -0
- package/lib/types/github.d.ts +31 -0
- package/lib/types/github.js +18 -0
- package/lib/types/github.js.map +1 -0
- package/lib/util.d.ts +21 -1
- package/lib/util.js +28 -7
- package/lib/util.js.map +1 -1
- package/package.json +12 -5
- package/lib/builder.d.ts +0 -28
- package/lib/builder.js.map +0 -1
- package/lib/buildkit.d.ts +0 -19
- package/lib/buildkit.js.map +0 -1
- package/lib/buildx.d.ts +0 -36
- package/lib/buildx.js.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
*/
|
|
16
|
+
import { Context } from '../context';
|
|
17
|
+
export declare class Inputs {
|
|
18
|
+
private readonly context;
|
|
19
|
+
constructor(context: Context);
|
|
20
|
+
getBuildImageIDFilePath(): string;
|
|
21
|
+
getBuildMetadataFilePath(): string;
|
|
22
|
+
resolveBuildImageID(): string | undefined;
|
|
23
|
+
resolveBuildMetadata(): string | undefined;
|
|
24
|
+
resolveDigest(): string | undefined;
|
|
25
|
+
resolveBuildSecretString(kvp: string): string;
|
|
26
|
+
resolveBuildSecretFile(kvp: string): string;
|
|
27
|
+
resolveBuildSecret(kvp: string, file: boolean): string;
|
|
28
|
+
getProvenanceInput(name: string): string;
|
|
29
|
+
resolveProvenanceAttrs(input: string): string;
|
|
30
|
+
static hasLocalExporter(exporters: string[]): boolean;
|
|
31
|
+
static hasTarExporter(exporters: string[]): boolean;
|
|
32
|
+
static hasDockerExporter(exporters: string[], load?: boolean): boolean;
|
|
33
|
+
static hasExporterType(name: string, exporters: string[]): boolean;
|
|
34
|
+
static hasGitAuthTokenSecret(secrets: string[]): boolean;
|
|
35
|
+
}
|
|
@@ -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);
|
|
@@ -22,104 +37,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
37
|
__setModuleDefault(result, mod);
|
|
23
38
|
return result;
|
|
24
39
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
40
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
41
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
42
|
};
|
|
37
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.
|
|
44
|
+
exports.Inputs = void 0;
|
|
39
45
|
const fs_1 = __importDefault(require("fs"));
|
|
40
46
|
const path_1 = __importDefault(require("path"));
|
|
41
47
|
const core = __importStar(require("@actions/core"));
|
|
42
|
-
const exec = __importStar(require("@actions/exec"));
|
|
43
48
|
const sync_1 = require("csv-parse/sync");
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
constructor(opts) {
|
|
48
|
-
var _a;
|
|
49
|
-
this.context = opts.context;
|
|
50
|
-
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
|
-
}
|
|
53
|
-
getCommand(args) {
|
|
54
|
-
return {
|
|
55
|
-
command: this.standalone ? 'buildx' : 'docker',
|
|
56
|
-
args: this.standalone ? args : ['buildx', ...args]
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
isAvailable() {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const cmd = this.getCommand([]);
|
|
62
|
-
return yield exec
|
|
63
|
-
.getExecOutput(cmd.command, cmd.args, {
|
|
64
|
-
ignoreReturnCode: true,
|
|
65
|
-
silent: true
|
|
66
|
-
})
|
|
67
|
-
.then(res => {
|
|
68
|
-
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
return res.exitCode == 0;
|
|
72
|
-
})
|
|
73
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
74
|
-
.catch(error => {
|
|
75
|
-
return false;
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
printInspect(name) {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
const cmd = this.getCommand(['inspect', name]);
|
|
82
|
-
yield exec.exec(cmd.command, cmd.args, {
|
|
83
|
-
failOnStdErr: false
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
getVersion() {
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
const cmd = this.getCommand(['version']);
|
|
90
|
-
return yield exec
|
|
91
|
-
.getExecOutput(cmd.command, cmd.args, {
|
|
92
|
-
ignoreReturnCode: true,
|
|
93
|
-
silent: true
|
|
94
|
-
})
|
|
95
|
-
.then(res => {
|
|
96
|
-
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
97
|
-
throw new Error(res.stderr.trim());
|
|
98
|
-
}
|
|
99
|
-
return Buildx.parseVersion(res.stdout.trim());
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
printVersion() {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
const cmd = this.getCommand(['version']);
|
|
106
|
-
yield exec.exec(cmd.command, cmd.args, {
|
|
107
|
-
failOnStdErr: false
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
static parseVersion(stdout) {
|
|
112
|
-
const matches = /\sv?([0-9a-f]{7}|[0-9.]+)/.exec(stdout);
|
|
113
|
-
if (!matches) {
|
|
114
|
-
throw new Error(`Cannot parse buildx version`);
|
|
115
|
-
}
|
|
116
|
-
return matches[1];
|
|
117
|
-
}
|
|
118
|
-
versionSatisfies(range, version) {
|
|
119
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
const ver = version !== null && version !== void 0 ? version : (yield this.version);
|
|
121
|
-
return semver.satisfies(ver, range) || /^[0-9a-f]{7}$/.exec(ver) !== null;
|
|
122
|
-
});
|
|
49
|
+
class Inputs {
|
|
50
|
+
constructor(context) {
|
|
51
|
+
this.context = context;
|
|
123
52
|
}
|
|
124
53
|
getBuildImageIDFilePath() {
|
|
125
54
|
return path_1.default.join(this.context.tmpDir(), 'iidfile').split(path_1.default.sep).join(path_1.default.posix.sep);
|
|
@@ -127,14 +56,14 @@ class Buildx {
|
|
|
127
56
|
getBuildMetadataFilePath() {
|
|
128
57
|
return path_1.default.join(this.context.tmpDir(), 'metadata-file').split(path_1.default.sep).join(path_1.default.posix.sep);
|
|
129
58
|
}
|
|
130
|
-
|
|
59
|
+
resolveBuildImageID() {
|
|
131
60
|
const iidFile = this.getBuildImageIDFilePath();
|
|
132
61
|
if (!fs_1.default.existsSync(iidFile)) {
|
|
133
62
|
return undefined;
|
|
134
63
|
}
|
|
135
64
|
return fs_1.default.readFileSync(iidFile, { encoding: 'utf-8' }).trim();
|
|
136
65
|
}
|
|
137
|
-
|
|
66
|
+
resolveBuildMetadata() {
|
|
138
67
|
const metadataFile = this.getBuildMetadataFilePath();
|
|
139
68
|
if (!fs_1.default.existsSync(metadataFile)) {
|
|
140
69
|
return undefined;
|
|
@@ -145,8 +74,8 @@ class Buildx {
|
|
|
145
74
|
}
|
|
146
75
|
return content;
|
|
147
76
|
}
|
|
148
|
-
|
|
149
|
-
const metadata = this.
|
|
77
|
+
resolveDigest() {
|
|
78
|
+
const metadata = this.resolveBuildMetadata();
|
|
150
79
|
if (metadata === undefined) {
|
|
151
80
|
return undefined;
|
|
152
81
|
}
|
|
@@ -156,13 +85,13 @@ class Buildx {
|
|
|
156
85
|
}
|
|
157
86
|
return undefined;
|
|
158
87
|
}
|
|
159
|
-
|
|
160
|
-
return this.
|
|
88
|
+
resolveBuildSecretString(kvp) {
|
|
89
|
+
return this.resolveBuildSecret(kvp, false);
|
|
161
90
|
}
|
|
162
|
-
|
|
163
|
-
return this.
|
|
91
|
+
resolveBuildSecretFile(kvp) {
|
|
92
|
+
return this.resolveBuildSecret(kvp, true);
|
|
164
93
|
}
|
|
165
|
-
|
|
94
|
+
resolveBuildSecret(kvp, file) {
|
|
166
95
|
const delimiterIndex = kvp.indexOf('=');
|
|
167
96
|
const key = kvp.substring(0, delimiterIndex);
|
|
168
97
|
let value = kvp.substring(delimiterIndex + 1);
|
|
@@ -191,10 +120,10 @@ class Buildx {
|
|
|
191
120
|
}
|
|
192
121
|
catch (err) {
|
|
193
122
|
// not a valid boolean, so we assume it's a string
|
|
194
|
-
return this.
|
|
123
|
+
return this.resolveProvenanceAttrs(input);
|
|
195
124
|
}
|
|
196
125
|
}
|
|
197
|
-
|
|
126
|
+
resolveProvenanceAttrs(input) {
|
|
198
127
|
if (!input) {
|
|
199
128
|
return `builder-id=${this.context.provenanceBuilderID}`;
|
|
200
129
|
}
|
|
@@ -217,13 +146,13 @@ class Buildx {
|
|
|
217
146
|
return `${input},builder-id=${this.context.provenanceBuilderID}`;
|
|
218
147
|
}
|
|
219
148
|
static hasLocalExporter(exporters) {
|
|
220
|
-
return
|
|
149
|
+
return Inputs.hasExporterType('local', exporters);
|
|
221
150
|
}
|
|
222
151
|
static hasTarExporter(exporters) {
|
|
223
|
-
return
|
|
152
|
+
return Inputs.hasExporterType('tar', exporters);
|
|
224
153
|
}
|
|
225
154
|
static hasDockerExporter(exporters, load) {
|
|
226
|
-
return load !== null && load !== void 0 ? load :
|
|
155
|
+
return load !== null && load !== void 0 ? load : Inputs.hasExporterType('docker', exporters);
|
|
227
156
|
}
|
|
228
157
|
static hasExporterType(name, exporters) {
|
|
229
158
|
const records = (0, sync_1.parse)(exporters.join(`\n`), {
|
|
@@ -255,5 +184,5 @@ class Buildx {
|
|
|
255
184
|
return false;
|
|
256
185
|
}
|
|
257
186
|
}
|
|
258
|
-
exports.
|
|
259
|
-
//# sourceMappingURL=
|
|
187
|
+
exports.Inputs = Inputs;
|
|
188
|
+
//# sourceM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G,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;AAzJD,wBAyJC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
*/
|
|
16
|
+
import { Context } from '../context';
|
|
17
|
+
import { GitHubRelease } from '../types/github';
|
|
18
|
+
export interface InstallOpts {
|
|
19
|
+
context?: Context;
|
|
20
|
+
standalone?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class Install {
|
|
23
|
+
private readonly _standalone;
|
|
24
|
+
private readonly context;
|
|
25
|
+
constructor(opts?: InstallOpts);
|
|
26
|
+
download(version: string, dest?: string): Promise<string>;
|
|
27
|
+
build(gitContext: string, dest?: string): Promise<string>;
|
|
28
|
+
private buildCommand;
|
|
29
|
+
private isStandalone;
|
|
30
|
+
private setStandalone;
|
|
31
|
+
private setPlugin;
|
|
32
|
+
private fetchBinary;
|
|
33
|
+
private platform;
|
|
34
|
+
private filename;
|
|
35
|
+
static getRelease(version: string): Promise<GitHubRelease>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
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
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
41
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
42
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
43
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
44
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
45
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
46
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.Install = void 0;
|
|
54
|
+
const fs_1 = __importDefault(require("fs"));
|
|
55
|
+
const os_1 = __importDefault(require("os"));
|
|
56
|
+
const path_1 = __importDefault(require("path"));
|
|
57
|
+
const core = __importStar(require("@actions/core"));
|
|
58
|
+
const exec = __importStar(require("@actions/exec"));
|
|
59
|
+
const httpm = __importStar(require("@actions/http-client"));
|
|
60
|
+
const tc = __importStar(require("@actions/tool-cache"));
|
|
61
|
+
const semver = __importStar(require("semver"));
|
|
62
|
+
const util = __importStar(require("util"));
|
|
63
|
+
const buildx_1 = require("./buildx");
|
|
64
|
+
const context_1 = require("../context");
|
|
65
|
+
const docker_1 = require("../docker");
|
|
66
|
+
const git_1 = require("../git");
|
|
67
|
+
class Install {
|
|
68
|
+
constructor(opts) {
|
|
69
|
+
this.context = (opts === null || opts === void 0 ? void 0 : opts.context) || new context_1.Context();
|
|
70
|
+
this._standalone = opts === null || opts === void 0 ? void 0 : opts.standalone;
|
|
71
|
+
}
|
|
72
|
+
download(version, dest) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const release = yield Install.getRelease(version);
|
|
75
|
+
const fversion = release.tag_name.replace(/^v+|v+$/g, '');
|
|
76
|
+
core.debug(`Install.download version: ${fversion}`);
|
|
77
|
+
let toolPath;
|
|
78
|
+
toolPath = tc.find('buildx', fversion, this.platform());
|
|
79
|
+
if (!toolPath) {
|
|
80
|
+
const c = semver.clean(fversion) || '';
|
|
81
|
+
if (!semver.valid(c)) {
|
|
82
|
+
throw new Error(`Invalid Buildx version "${fversion}".`);
|
|
83
|
+
}
|
|
84
|
+
toolPath = yield this.fetchBinary(fversion);
|
|
85
|
+
}
|
|
86
|
+
core.debug(`Install.download toolPath: ${toolPath}`);
|
|
87
|
+
dest = dest || ((yield this.isStandalone()) ? this.context.tmpDir() : docker_1.Docker.configDir);
|
|
88
|
+
core.debug(`Install.download dest: ${dest}`);
|
|
89
|
+
if (yield this.isStandalone()) {
|
|
90
|
+
return this.setStandalone(toolPath, dest);
|
|
91
|
+
}
|
|
92
|
+
return this.setPlugin(toolPath, dest);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
build(gitContext, dest) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
// eslint-disable-next-line prefer-const
|
|
98
|
+
let [repo, ref] = gitContext.split('#');
|
|
99
|
+
if (ref.length == 0) {
|
|
100
|
+
ref = 'master';
|
|
101
|
+
}
|
|
102
|
+
let vspec;
|
|
103
|
+
// TODO: include full ref as fingerprint. Use commit sha as best-effort in the meantime.
|
|
104
|
+
if (ref.match(/^[0-9a-fA-F]{40}$/)) {
|
|
105
|
+
vspec = ref;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
vspec = yield git_1.Git.getRemoteSha(repo, ref);
|
|
109
|
+
}
|
|
110
|
+
core.debug(`Install.build: tool version spec ${vspec}`);
|
|
111
|
+
let toolPath;
|
|
112
|
+
toolPath = tc.find('buildx', vspec);
|
|
113
|
+
if (!toolPath) {
|
|
114
|
+
const outputDir = path_1.default.join(this.context.tmpDir(), 'build-cache').split(path_1.default.sep).join(path_1.default.posix.sep);
|
|
115
|
+
const buildCmd = yield this.buildCommand(gitContext, outputDir);
|
|
116
|
+
toolPath = yield exec
|
|
117
|
+
.getExecOutput(buildCmd.command, buildCmd.args, {
|
|
118
|
+
ignoreReturnCode: true
|
|
119
|
+
})
|
|
120
|
+
.then(res => {
|
|
121
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
122
|
+
core.warning(res.stderr.trim());
|
|
123
|
+
}
|
|
124
|
+
return tc.cacheFile(`${outputDir}/buildx`, os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx', 'buildx', vspec);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
dest = dest || docker_1.Docker.configDir;
|
|
128
|
+
core.debug(`Install.build dest: ${dest}`);
|
|
129
|
+
if (yield this.isStandalone()) {
|
|
130
|
+
return this.setStandalone(toolPath, dest);
|
|
131
|
+
}
|
|
132
|
+
return this.setPlugin(toolPath, dest);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
buildCommand(gitContext, outputDir) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const buildxStandaloneFound = yield new buildx_1.Buildx({ context: this.context, standalone: true }).isAvailable();
|
|
138
|
+
const buildxPluginFound = yield new buildx_1.Buildx({ context: this.context, standalone: false }).isAvailable();
|
|
139
|
+
let buildStandalone = false;
|
|
140
|
+
if ((yield this.isStandalone()) && buildxStandaloneFound) {
|
|
141
|
+
core.debug(`Install.buildCommand: Buildx standalone found, build with it`);
|
|
142
|
+
buildStandalone = true;
|
|
143
|
+
}
|
|
144
|
+
else if (!(yield this.isStandalone()) && buildxPluginFound) {
|
|
145
|
+
core.debug(`Install.buildCommand: Buildx plugin found, build with it`);
|
|
146
|
+
buildStandalone = false;
|
|
147
|
+
}
|
|
148
|
+
else if (buildxStandaloneFound) {
|
|
149
|
+
core.debug(`Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it`);
|
|
150
|
+
buildStandalone = true;
|
|
151
|
+
}
|
|
152
|
+
else if (buildxPluginFound) {
|
|
153
|
+
core.debug(`Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it`);
|
|
154
|
+
buildStandalone = false;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${gitContext}`);
|
|
158
|
+
}
|
|
159
|
+
//prettier-ignore
|
|
160
|
+
return yield new buildx_1.Buildx({ context: this.context, standalone: buildStandalone }).getCommand([
|
|
161
|
+
'build',
|
|
162
|
+
'--target', 'binaries',
|
|
163
|
+
'--build-arg', 'BUILDKIT_CONTEXT_KEEP_GIT_DIR=1',
|
|
164
|
+
'--output', `type=local,dest=${outputDir}`,
|
|
165
|
+
gitContext
|
|
166
|
+
]);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
isStandalone() {
|
|
170
|
+
var _a;
|
|
171
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
+
const standalone = (_a = this._standalone) !== null && _a !== void 0 ? _a : !(yield docker_1.Docker.getInstance().isAvailable());
|
|
173
|
+
core.debug(`Install.isStandalone: ${standalone}`);
|
|
174
|
+
return standalone;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
setStandalone(toolPath, dest) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
const toolBinPath = path_1.default.join(toolPath, os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx');
|
|
180
|
+
const binDir = path_1.default.join(dest, 'bin');
|
|
181
|
+
if (!fs_1.default.existsSync(binDir)) {
|
|
182
|
+
fs_1.default.mkdirSync(binDir, { recursive: true });
|
|
183
|
+
}
|
|
184
|
+
const filename = os_1.default.platform() == 'win32' ? 'buildx.exe' : 'buildx';
|
|
185
|
+
const buildxPath = path_1.default.join(binDir, filename);
|
|
186
|
+
fs_1.default.copyFileSync(toolBinPath, buildxPath);
|
|
187
|
+
fs_1.default.chmodSync(buildxPath, '0755');
|
|
188
|
+
core.addPath(binDir);
|
|
189
|
+
core.debug(`Install.setStandalone buildxPath: ${buildxPath}`);
|
|
190
|
+
return buildxPath;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
setPlugin(toolPath, dest) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
const toolBinPath = path_1.default.join(toolPath, os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx');
|
|
196
|
+
const pluginsDir = path_1.default.join(dest, 'cli-plugins');
|
|
197
|
+
if (!fs_1.default.existsSync(pluginsDir)) {
|
|
198
|
+
fs_1.default.mkdirSync(pluginsDir, { recursive: true });
|
|
199
|
+
}
|
|
200
|
+
const filename = os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx';
|
|
201
|
+
const pluginPath = path_1.default.join(pluginsDir, filename);
|
|
202
|
+
fs_1.default.copyFileSync(toolBinPath, pluginPath);
|
|
203
|
+
fs_1.default.chmodSync(pluginPath, '0755');
|
|
204
|
+
core.debug(`Install.setPlugin pluginPath: ${pluginPath}`);
|
|
205
|
+
return pluginPath;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
fetchBinary(version) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
const targetFile = os_1.default.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx';
|
|
211
|
+
const downloadURL = util.format('https://github.com/docker/buildx/releases/download/v%s/%s', version, this.filename(version));
|
|
212
|
+
const downloadPath = yield tc.downloadTool(downloadURL);
|
|
213
|
+
core.debug(`downloadURL: ${downloadURL}`);
|
|
214
|
+
core.debug(`downloadPath: ${downloadPath}`);
|
|
215
|
+
return yield tc.cacheFile(downloadPath, targetFile, 'buildx', version);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
platform() {
|
|
219
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
220
|
+
const arm_version = process.config.variables.arm_version;
|
|
221
|
+
return `${os_1.default.platform()}-${os_1.default.arch()}${arm_version ? 'v' + arm_version : ''}`;
|
|
222
|
+
}
|
|
223
|
+
filename(version) {
|
|
224
|
+
let arch;
|
|
225
|
+
switch (os_1.default.arch()) {
|
|
226
|
+
case 'x64': {
|
|
227
|
+
arch = 'amd64';
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
case 'ppc64': {
|
|
231
|
+
arch = 'ppc64le';
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
case 'arm': {
|
|
235
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
236
|
+
const arm_version = process.config.variables.arm_version;
|
|
237
|
+
arch = arm_version ? 'arm-v' + arm_version : 'arm';
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
default: {
|
|
241
|
+
arch = os_1.default.arch();
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const platform = os_1.default.platform() == 'win32' ? 'windows' : os_1.default.platform();
|
|
246
|
+
const ext = os_1.default.platform() == 'win32' ? '.exe' : '';
|
|
247
|
+
return util.format('buildx-v%s.%s-%s%s', version, platform, arch, ext);
|
|
248
|
+
}
|
|
249
|
+
static getRelease(version) {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
const url = `https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-releases.json`;
|
|
252
|
+
const http = new httpm.HttpClient('docker-actions-toolkit');
|
|
253
|
+
const resp = yield http.get(url);
|
|
254
|
+
const body = yield resp.readBody();
|
|
255
|
+
const statusCode = resp.message.statusCode || 500;
|
|
256
|
+
if (statusCode >= 400) {
|
|
257
|
+
throw new Error(`Failed to get Buildx release ${version} from ${url} with status code ${statusCode}: ${body}`);
|
|
258
|
+
}
|
|
259
|
+
const releases = JSON.parse(body);
|
|
260
|
+
if (!releases[version]) {
|
|
261
|
+
throw new Error(`Cannot find Buildx release ${version} in ${url}`);
|
|
262
|
+
}
|
|
263
|
+
return releases[version];
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
exports.Install = Install;
|
|
268
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/buildx/install.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,oDAAsC;AACtC,oDAAsC;AACtC,4DAA8C;AAC9C,wDAA0C;AAC1C,+CAAiC;AACjC,2CAA6B;AAE7B,qCAAgC;AAChC,wCAAmC;AACnC,sCAAiC;AACjC,gCAA2B;AAS3B,MAAa,OAAO;IAKlB,YAAY,IAAkB;QAC5B,IAAI,CAAC,OAAO,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,KAAI,IAAI,iBAAO,EAAE,CAAC;QAC9C,IAAI,CAAC,WAAW,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,CAAC;IACtC,CAAC;IAEY,QAAQ,CAAC,O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GAAG,qBAAqB,UAAU,KAAK,IAAI,EAAE,CAAC,CAAC;aAChH;YACD,MAAM,QAAQ,GAAkC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACjE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBACtB,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,OAAO,GAAG,EAAE,CAAC,CAAC;aACpE;YACD,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;KAAA;CACF;AAtMD,0BAsMC"}
|
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,cAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAGhI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;QACjC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YACzE,IAAI,CAAC,MAAM,GAAG,cAAc,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;SAClD;QACD,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;YAC/D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;SAClC;QACD,IAAI,CAAC,eAAe,GAAG,GAAG,eAAM,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACzH,IAAI,CAAC,mBAAmB,GAAG,GAAG,eAAM,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,iBAAiB,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACjJ,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEM,OAAO,CAAC,OAA4B;QACzC,OAAO,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;CACF;AA1BD,0BA0BC"}
|
package/lib/docker.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
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 Docker {
|
|
2
|
-
static
|
|
17
|
+
private static instance?;
|
|
18
|
+
static getInstance: () => Docker;
|
|
19
|
+
private _available;
|
|
20
|
+
private constructor();
|
|
21
|
+
static get configDir(): string;
|
|
22
|
+
isAvailable(): Promise<boolean>;
|
|
3
23
|
static printVersion(standalone?: boolean): Promise<void>;
|
|
4
24
|
static printInfo(standalone?: boolean): Promise<void>;
|
|
5
25
|
}
|