mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-08 13:10:13 +08:00
Compare commits
No commits in common. "master" and "v6" have entirely different histories.
13
README.md
13
README.md
@ -185,19 +185,6 @@ additional details about the build, including build stats, logs, outputs, and
|
|||||||
more. The build record can be imported to Docker Desktop for inspecting the
|
more. The build record can be imported to Docker Desktop for inspecting the
|
||||||
build in greater detail.
|
build in greater detail.
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
>
|
|
||||||
> If you're using the [`actions/download-artifact`](https://github.com/actions/download-artifact)
|
|
||||||
> action in your workflow, you need to ignore the build record artifacts
|
|
||||||
> if `name` and `pattern` inputs are not specified ([defaults to download all artifacts](https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts) of the workflow),
|
|
||||||
> otherwise the action will fail:
|
|
||||||
> ```yaml
|
|
||||||
> - uses: actions/download-artifact@v4
|
|
||||||
> with:
|
|
||||||
> pattern: "!*.dockerbuild"
|
|
||||||
> ```
|
|
||||||
> More info: https://github.com/actions/toolkit/pull/1874
|
|
||||||
|
|
||||||
Summaries are enabled by default, but can be disabled with the
|
Summaries are enabled by default, but can be disabled with the
|
||||||
`DOCKER_BUILD_SUMMARY` [environment variable](#environment-variables).
|
`DOCKER_BUILD_SUMMARY` [environment variable](#environment-variables).
|
||||||
|
|
||||||
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
12
src/main.ts
12
src/main.ts
@ -108,9 +108,9 @@ actionsToolkit.run(
|
|||||||
if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
|
if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
|
||||||
// checks warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
|
// checks warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
|
||||||
// take the first line with the message summaryzing the warnings
|
// take the first line with the message summaryzing the warnings
|
||||||
err = new Error(res.stdout.split('\n')[0]?.trim());
|
err = Error(res.stdout.split('\n')[0]?.trim());
|
||||||
} else if (res.stderr.length > 0) {
|
} else if (res.stderr.length > 0) {
|
||||||
err = new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
|
err = Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -225,11 +225,7 @@ actionsToolkit.run(
|
|||||||
}
|
}
|
||||||
if (stateHelper.tmpDir.length > 0) {
|
if (stateHelper.tmpDir.length > 0) {
|
||||||
await core.group(`Removing temp folder ${stateHelper.tmpDir}`, async () => {
|
await core.group(`Removing temp folder ${stateHelper.tmpDir}`, async () => {
|
||||||
try {
|
fs.rmSync(stateHelper.tmpDir, {recursive: true});
|
||||||
fs.rmSync(stateHelper.tmpDir, {recursive: true});
|
|
||||||
} catch (e) {
|
|
||||||
core.warning(`Failed to remove temp folder ${stateHelper.tmpDir}`);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,7 +285,7 @@ function buildRecordRetentionDays(): number | undefined {
|
|||||||
if (val) {
|
if (val) {
|
||||||
const res = parseInt(val);
|
const res = parseInt(val);
|
||||||
if (isNaN(res)) {
|
if (isNaN(res)) {
|
||||||
throw new Error(`Invalid build record retention days: ${val}`);
|
throw Error(`Invalid build record retention days: ${val}`);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user