mirror of
https://github.com/docker/build-push-action.git
synced 2024-11-12 21:35:38 +01:00
Local if no type is defined for output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
bf051e6237
commit
6751eb6bd5
@ -80,7 +80,7 @@ describe('isLocalOrTarExporter', () => {
|
|||||||
[
|
[
|
||||||
'.'
|
'.'
|
||||||
],
|
],
|
||||||
false
|
true
|
||||||
],
|
],
|
||||||
])(
|
])(
|
||||||
'given %p returns %p',
|
'given %p returns %p',
|
||||||
|
@ -95,7 +95,6 @@ describe('getArgs', () => {
|
|||||||
'buildx',
|
'buildx',
|
||||||
'build',
|
'build',
|
||||||
'--output', '.',
|
'--output', '.',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
|
||||||
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
||||||
'--file', 'Dockerfile',
|
'--file', 'Dockerfile',
|
||||||
'https://github.com/docker/build-push-action.git#test-jest'
|
'https://github.com/docker/build-push-action.git#test-jest'
|
||||||
|
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
@ -5368,6 +5368,11 @@ function isLocalOrTarExporter(outputs) {
|
|||||||
columns: false,
|
columns: false,
|
||||||
relax_column_count: true
|
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()))) {
|
for (let [key, value] of output.map(chunk => chunk.split('=').map(item => item.trim()))) {
|
||||||
if (key == 'type' && (value == 'local' || value == 'tar')) {
|
if (key == 'type' && (value == 'local' || value == 'tar')) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -33,6 +33,11 @@ export function isLocalOrTarExporter(outputs: string[]): Boolean {
|
|||||||
columns: false,
|
columns: false,
|
||||||
relax_column_count: true
|
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()))) {
|
for (let [key, value] of output.map(chunk => chunk.split('=').map(item => item.trim()))) {
|
||||||
if (key == 'type' && (value == 'local' || value == 'tar')) {
|
if (key == 'type' && (value == 'local' || value == 'tar')) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user