mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-06-08 01:49:03 +00:00
Rename 'archs' input and improve multiarch
Expand readme Add example Signed-off-by: Tim Etchells <tetchel@gmail.com>
This commit is contained in:
parent
098556ccc2
commit
5cf7e9c453
12 changed files with 670 additions and 424 deletions
|
@ -14,13 +14,13 @@ export interface BuildahConfigSettings {
|
|||
envs?: string[];
|
||||
port?: string;
|
||||
workingdir?: string;
|
||||
archs?: string;
|
||||
arch?: string;
|
||||
}
|
||||
|
||||
interface Buildah {
|
||||
buildUsingDocker(
|
||||
image: string, context: string, dockerFiles: string[], buildArgs: string[],
|
||||
useOCI: boolean, archs: string, layers: string, extraArgs: string[]
|
||||
useOCI: boolean, arch: string, layers: string, extraArgs: string[]
|
||||
): Promise<CommandResult>;
|
||||
from(baseImage: string): Promise<CommandResult>;
|
||||
copy(container: string, contentToCopy: string[]): Promise<CommandResult | undefined>;
|
||||
|
@ -63,12 +63,12 @@ export class BuildahCli implements Buildah {
|
|||
|
||||
async buildUsingDocker(
|
||||
image: string, context: string, dockerFiles: string[], buildArgs: string[],
|
||||
useOCI: boolean, archs: string, layers: string, extraArgs: string[]
|
||||
useOCI: boolean, arch: string, layers: string, extraArgs: string[]
|
||||
): Promise<CommandResult> {
|
||||
const args: string[] = [ "bud" ];
|
||||
if (archs) {
|
||||
if (arch) {
|
||||
args.push("--arch");
|
||||
args.push(archs);
|
||||
args.push(arch);
|
||||
}
|
||||
dockerFiles.forEach((file) => {
|
||||
args.push("-f");
|
||||
|
@ -131,9 +131,9 @@ export class BuildahCli implements Buildah {
|
|||
args.push(env);
|
||||
});
|
||||
}
|
||||
if (settings.archs) {
|
||||
if (settings.arch) {
|
||||
args.push("--arch");
|
||||
args.push(settings.archs);
|
||||
args.push(settings.arch);
|
||||
}
|
||||
if (settings.workingdir) {
|
||||
args.push("--workingdir");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue