mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-04-20 09:01:23 +00:00
Run buildah config command before copy command
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
a9a026b165
commit
09f51f8381
4 changed files with 4 additions and 5 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -23,8 +23,8 @@ interface Buildah {
|
||||||
useOCI: boolean, arch: string, layers: string, extraArgs: string[]
|
useOCI: boolean, arch: string, layers: string, extraArgs: string[]
|
||||||
): Promise<CommandResult>;
|
): Promise<CommandResult>;
|
||||||
from(baseImage: string): Promise<CommandResult>;
|
from(baseImage: string): Promise<CommandResult>;
|
||||||
copy(container: string, contentToCopy: string[]): Promise<CommandResult | undefined>;
|
|
||||||
config(container: string, setting: BuildahConfigSettings): Promise<CommandResult>;
|
config(container: string, setting: BuildahConfigSettings): Promise<CommandResult>;
|
||||||
|
copy(container: string, contentToCopy: string[]): Promise<CommandResult | undefined>;
|
||||||
commit(container: string, newImageName: string, useOCI: boolean): Promise<CommandResult>;
|
commit(container: string, newImageName: string, useOCI: boolean): Promise<CommandResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,6 @@ async function doBuildFromScratch(
|
||||||
const container = await cli.from(baseImage);
|
const container = await cli.from(baseImage);
|
||||||
const containerId = container.output.replace("\n", "");
|
const containerId = container.output.replace("\n", "");
|
||||||
|
|
||||||
await cli.copy(containerId, content);
|
|
||||||
|
|
||||||
const newImageConfig: BuildahConfigSettings = {
|
const newImageConfig: BuildahConfigSettings = {
|
||||||
entrypoint,
|
entrypoint,
|
||||||
port,
|
port,
|
||||||
|
@ -109,6 +107,7 @@ async function doBuildFromScratch(
|
||||||
arch,
|
arch,
|
||||||
};
|
};
|
||||||
await cli.config(containerId, newImageConfig);
|
await cli.config(containerId, newImageConfig);
|
||||||
|
await cli.copy(containerId, content);
|
||||||
await cli.commit(containerId, newImage, useOCI);
|
await cli.commit(containerId, newImage, useOCI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue