build-contexts input

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-03-14 20:09:10 +01:00
parent e115266953
commit 7c41daf2a5
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
6 changed files with 50 additions and 19 deletions

6
dist/index.js generated vendored
View file

@ -286,6 +286,7 @@ function getInputs(defaultContext) {
addHosts: yield getInputList('add-hosts'),
allow: yield getInputList('allow'),
buildArgs: yield getInputList('build-args', true),
buildContexts: yield getInputList('build-contexts', true),
builder: core.getInput('builder'),
cacheFrom: yield getInputList('cache-from', true),
cacheTo: yield getInputList('cache-to', true),
@ -334,6 +335,11 @@ function getBuildArgs(inputs, defaultContext, buildxVersion) {
yield exports.asyncForEach(inputs.buildArgs, (buildArg) => __awaiter(this, void 0, void 0, function* () {
args.push('--build-arg', buildArg);
}));
if (buildx.satisfies(buildxVersion, '>=0.8.0')) {
yield exports.asyncForEach(inputs.buildContexts, (buildContext) => __awaiter(this, void 0, void 0, function* () {
args.push('--build-context', buildContext);
}));
}
yield exports.asyncForEach(inputs.cacheFrom, (cacheFrom) => __awaiter(this, void 0, void 0, function* () {
args.push('--cache-from', cacheFrom);
}));