Compare commits

...

5 Commits
v6 ... master

Author SHA1 Message Date
CrazyMax
66147ca503
Merge pull request #1344 from k-kbk/add-exception-handling
refactor: add missing 'new' and exception handling
2025-04-07 14:46:26 +02:00
k-kbk
8ea72f78e8 chore: update dist
Signed-off-by: k-kbk <kkbk0077@gmail.com>
2025-04-01 23:28:50 +09:00
Bokyeom
6481840af9
refactor: add missing 'new' and exception handling
Signed-off-by: Bokyeom <79684339+k-kbk@users.noreply.github.com>
2025-04-01 11:36:44 +09:00
CrazyMax
84ad562665
Merge pull request #1337 from crazy-max/note-download-artifact
note about usage of summary feature with download-artifact action
2025-03-10 16:09:21 +01:00
CrazyMax
9bea05fc44
note about usage of summary feature with download-artifact action
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-03-10 11:16:14 +01:00
4 changed files with 23 additions and 6 deletions

View File

@ -185,6 +185,19 @@ additional details about the build, including build stats, logs, outputs, and
more. The build record can be imported to Docker Desktop for inspecting the
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
`DOCKER_BUILD_SUMMARY` [environment variable](#environment-variables).

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -108,9 +108,9 @@ actionsToolkit.run(
if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
// checks warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
// take the first line with the message summaryzing the warnings
err = Error(res.stdout.split('\n')[0]?.trim());
err = new Error(res.stdout.split('\n')[0]?.trim());
} else if (res.stderr.length > 0) {
err = Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
err = new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
}
}
});
@ -225,7 +225,11 @@ actionsToolkit.run(
}
if (stateHelper.tmpDir.length > 0) {
await core.group(`Removing temp folder ${stateHelper.tmpDir}`, async () => {
fs.rmSync(stateHelper.tmpDir, {recursive: true});
try {
fs.rmSync(stateHelper.tmpDir, {recursive: true});
} catch (e) {
core.warning(`Failed to remove temp folder ${stateHelper.tmpDir}`);
}
});
}
}
@ -285,7 +289,7 @@ function buildRecordRetentionDays(): number | undefined {
if (val) {
const res = parseInt(val);
if (isNaN(res)) {
throw Error(`Invalid build record retention days: ${val}`);
throw new Error(`Invalid build record retention days: ${val}`);
}
return res;
}