From b90e389dd8564e3c6964d095f62618f210e673db Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 22 Jan 2025 09:55:49 +0100 Subject: [PATCH] test: cache-from Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- __tests__/context.test.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index 2621ce4..2f98585 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -799,6 +799,27 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`] '.' ] ], + [ + 34, + '0.20.0', + new Map([ + ['cache-from', `type=gha +type=registry,ref=foo/bar:cache`], + ['load', 'false'], + ['no-cache', 'false'], + ['push', 'false'], + ['pull', 'false'], + ]), + [ + 'build', + '--cache-from', 'type=gha', + '--cache-from', 'type=registry,ref=foo/bar:cache', + '--iidfile', imageIDFilePath, + '--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`, + '--metadata-file', metadataJson, + 'https://github.com/docker/build-push-action.git#refs/heads/master' + ] + ] ])( '[%d] given %p with %p as inputs, returns %p', async (num: number, buildxVersion: string, inputs: Map, expected: Array) => {