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:
parent
1ca185b339
commit
d7458455bb
6 changed files with 19 additions and 15 deletions
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
|
@ -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(','));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue