cache-image input to enable/disable caching of binfmt image

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-07-03 11:42:53 +02:00
parent 8b562efa09
commit 0d7f78d53b
6 changed files with 45 additions and 13 deletions

View File

@@ -20,13 +20,7 @@ actionsToolkit.run(
});
await core.group(`Pulling binfmt Docker image`, async () => {
await Docker.getExecOutput(['pull', input.image], {
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
}
});
await Docker.pull(input.image, input.cacheImage);
});
await core.group(`Image info`, async () => {