From d189d0ef33a3269ad4a3c50511f63fb7b6d63809 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:47:38 +0200 Subject: [PATCH] Revert "set repository and ghtoken attributes for gha cache type" This reverts commit 522345f555207803568057b1b01d3120964b92e2. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- __tests__/context.test.ts | 21 --------------------- src/context.ts | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index fa59e5d49..2621ce42d 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -799,27 +799,6 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`] '.' ] ], - [ - 34, - '0.14.1', - new Map([ - ['context', '.'], - ['load', 'false'], - ['no-cache', 'false'], - ['push', 'false'], - ['pull', 'false'], - ['cache-to', 'type=gha'], - ['github-token', `abcd1234`], - ]), - [ - 'build', - '--cache-to', 'type=gha,repository=docker/build-push-action,ghtoken=abcd1234', - '--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, - '.' - ] - ], ])( '[%d] given %p with %p as inputs, returns %p', async (num: number, buildxVersion: string, inputs: Map, expected: Array) => { diff --git a/src/context.ts b/src/context.ts index deb1d5b7b..7dd57c5d3 100644 --- a/src/context.ts +++ b/src/context.ts @@ -139,7 +139,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit): args.push('--cache-from', cacheFrom); }); await Util.asyncForEach(inputs['cache-to'], async cacheTo => { - args.push('--cache-to', Build.resolveCacheToAttrs(cacheTo, inputs['github-token'])); + args.push('--cache-to', cacheTo); }); if (inputs['cgroup-parent']) { args.push('--cgroup-parent', inputs['cgroup-parent']);