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

@ -16,10 +16,13 @@ describe('getInputs', () => {
test.each([
[
0,
new Map<string, string>([]),
new Map<string, string>([
['cache-image', 'true'],
]),
{
image: 'docker.io/tonistiigi/binfmt:latest',
platforms: 'all',
cacheImage: true,
} as context.Inputs
],
[
@ -27,20 +30,24 @@ describe('getInputs', () => {
new Map<string, string>([
['image', 'docker/binfmt:latest'],
['platforms', 'arm64,riscv64,arm'],
['cache-image', 'false'],
]),
{
image: 'docker/binfmt:latest',
platforms: 'arm64,riscv64,arm',
cacheImage: false,
} as context.Inputs
],
[
2,
new Map<string, string>([
['platforms', 'arm64, riscv64, arm '],
['cache-image', 'true'],
]),
{
image: 'docker.io/tonistiigi/binfmt:latest',
platforms: 'arm64,riscv64,arm',
cacheImage: true,
} as context.Inputs
]
])(