diff --git a/__tests__/buildx.test.ts b/__tests__/buildx.test.ts index 5fb6937..2710ee4 100644 --- a/__tests__/buildx.test.ts +++ b/__tests__/buildx.test.ts @@ -80,7 +80,7 @@ describe('isLocalOrTarExporter', () => { [ '.' ], - false + true ], ])( 'given %p returns %p', diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index 6bdc30f..133f1d2 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -95,7 +95,6 @@ describe('getArgs', () => { 'buildx', 'build', '--output', '.', - '--iidfile', '/tmp/.docker-build-push-jest/iidfile', '--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest', '--file', 'Dockerfile', 'https://github.com/docker/build-push-action.git#test-jest' diff --git a/dist/index.js b/dist/index.js index 4a189ef..ccd9baa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5368,6 +5368,11 @@ function isLocalOrTarExporter(outputs) { columns: false, relax_column_count: true })) { + // Local if no type is defined + // https://github.com/docker/buildx/blob/d2bf42f8b4784d83fde17acb3ed84703ddc2156b/build/output.go#L29-L43 + if (output.length == 1 && !output[0].startsWith('type=')) { + return true; + } for (let [key, value] of output.map(chunk => chunk.split('=').map(item => item.trim()))) { if (key == 'type' && (value == 'local' || value == 'tar')) { return true; diff --git a/src/buildx.ts b/src/buildx.ts index cb04b45..32f5fc3 100644 --- a/src/buildx.ts +++ b/src/buildx.ts @@ -33,6 +33,11 @@ export function isLocalOrTarExporter(outputs: string[]): Boolean { columns: false, relax_column_count: true })) { + // Local if no type is defined + // https://github.com/docker/buildx/blob/d2bf42f8b4784d83fde17acb3ed84703ddc2156b/build/output.go#L29-L43 + if (output.length == 1 && !output[0].startsWith('type=')) { + return true; + } for (let [key, value] of output.map(chunk => chunk.split('=').map(item => item.trim()))) { if (key == 'type' && (value == 'local' || value == 'tar')) { return true;