Skip to content

Commit

Permalink
Add buildkit address input
Browse files Browse the repository at this point in the history
  • Loading branch information
bigs committed Feb 22, 2023
1 parent b360d47 commit fca0e76
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ inputs:
buildkit:
description: "User docker buildkit for building images"
required: false
default: "true"
default: "false"

buildkit-address:
description: "Address of the buildkit socket, can be unix, tcp, ssl (default \"unix:///run/buildkit/buildkitd.sock\")"
required: false

platform:
description: "Comma separated list of platforms to build containers for"
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const buildKeysString = [
"org",
"registry",
"platform",
"buildkit-address",
] as const;

const buildKeysBoolean = ["local", "buildkit"] as const;
Expand Down Expand Up @@ -104,6 +105,10 @@ function buildOptionsToArguments(opts: BuildOptions): string[] {
args = [...args, "--platform", opts.platform];
}

if (opts["buildkit-address"] !== undefined) {
args = [...args, "--buildkit-addr", opts["buildkit-address"]];
}

return args;
}

Expand Down

0 comments on commit fca0e76

Please sign in to comment.