1
0
Fork 0
mirror of https://github.com/docker/build-push-action.git synced 2025-04-22 14:46:39 +02:00

Fix add-hosts context

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-01-31 11:47:45 +01:00
parent 1ca185b339
commit d7458455bb
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
6 changed files with 19 additions and 15 deletions

8
dist/index.js generated vendored
View file

@ -270,7 +270,7 @@ exports.tmpNameSync = tmpNameSync;
function getInputs(defaultContext) {
return __awaiter(this, void 0, void 0, function* () {
return {
addHost: yield getInputList('add-host'),
addHosts: yield getInputList('add-hosts'),
allow: yield getInputList('allow'),
buildArgs: yield getInputList('build-args', true),
builder: core.getInput('builder'),
@ -312,9 +312,9 @@ exports.getArgs = getArgs;
function getBuildArgs(inputs, defaultContext, buildxVersion) {
return __awaiter(this, void 0, void 0, function* () {
let args = ['build'];
if (inputs.addHost.length > 0) {
args.push('--add-host', inputs.addHost.join(','));
}
yield exports.asyncForEach(inputs.addHosts, (addHost) => __awaiter(this, void 0, void 0, function* () {
args.push('--add-host', addHost);
}));
if (inputs.allow.length > 0) {
args.push('--allow', inputs.allow.join(','));
}