mirror of
https://github.com/docker/bake-action.git
synced 2026-06-05 01:38:39 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e878ca2dca | |||
| 3123696764 | |||
| c22ea4a824 | |||
| 5cb4f0eeb6 | |||
| e917a42053 |
@@ -82,6 +82,7 @@ Following inputs can be used as `step.with` keys
|
||||
|------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
|
||||
| `files` | List/CSV | List of [bake definition files](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md#file) |
|
||||
| `workdir` | String | Working directory of execution |
|
||||
| `targets` | List/CSV | List of bake targets |
|
||||
| `no-cache` | Bool | Do not use cache when building the image (default `false`) |
|
||||
| `pull` | Bool | Always attempt to pull a newer version of the image (default `false`) |
|
||||
|
||||
@@ -13,6 +13,10 @@ inputs:
|
||||
files:
|
||||
description: "List of bake definition files"
|
||||
required: true
|
||||
workdir:
|
||||
description: "Working directory of bake execution"
|
||||
required: false
|
||||
default: '.'
|
||||
targets:
|
||||
description: "List of bake targets"
|
||||
required: false
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -30,7 +30,7 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"csv-parse": "^5.2.0",
|
||||
"csv-parse": "^5.3.0",
|
||||
"semver": "^7.3.7",
|
||||
"tmp": "^0.2.1"
|
||||
},
|
||||
|
||||
@@ -12,6 +12,7 @@ let _tmpDir: string;
|
||||
export interface Inputs {
|
||||
builder: string;
|
||||
files: string[];
|
||||
workdir: string;
|
||||
targets: string[];
|
||||
noCache: boolean;
|
||||
pull: boolean;
|
||||
@@ -36,6 +37,7 @@ export async function getInputs(): Promise<Inputs> {
|
||||
return {
|
||||
builder: core.getInput('builder'),
|
||||
files: getInputList('files'),
|
||||
workdir: core.getInput('workdir') || '.',
|
||||
targets: getInputList('targets'),
|
||||
noCache: core.getBooleanInput('no-cache'),
|
||||
pull: core.getBooleanInput('pull'),
|
||||
|
||||
+4
-1
@@ -44,11 +44,14 @@ async function run(): Promise<void> {
|
||||
const buildCmd = buildx.getCommand(args, standalone);
|
||||
|
||||
core.startGroup(`Bake definition`);
|
||||
await exec.exec(buildCmd.command, [...buildCmd.args, '--print']);
|
||||
await exec.exec(buildCmd.command, [...buildCmd.args, '--print'], {
|
||||
cwd: inputs.workdir
|
||||
});
|
||||
core.endGroup();
|
||||
|
||||
await exec
|
||||
.getExecOutput(buildCmd.command, buildCmd.args, {
|
||||
cwd: inputs.workdir,
|
||||
ignoreReturnCode: true
|
||||
})
|
||||
.then(res => {
|
||||
|
||||
@@ -1444,10 +1444,10 @@ cssstyle@^2.3.0:
|
||||
dependencies:
|
||||
cssom "~0.3.6"
|
||||
|
||||
csv-parse@*, csv-parse@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.2.0.tgz#492b5ca2e5e87e3672ca834e83ab3a0e2486d5cb"
|
||||
integrity sha512-ZuLjTp3Qx2gycoB7FKS9q11KgDL3f0wQszTlNOajS3fHa0jypN/zgjmkam+rczX5dXw5z7+KrDW2hWkM4542Ug==
|
||||
csv-parse@*, csv-parse@^5.3.0:
|
||||
version "5.3.0"
|
||||
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.3.0.tgz#85cc02fc9d1c89bd1b02e69069c960f8b8064322"
|
||||
integrity sha512-UXJCGwvJ2fep39purtAn27OUYmxB1JQto+zhZ4QlJpzsirtSFbzLvip1aIgziqNdZp/TptvsKEV5BZSxe10/DQ==
|
||||
|
||||
data-urls@^2.0.0:
|
||||
version "2.0.0"
|
||||
|
||||
Reference in New Issue
Block a user