mirror of
https://github.com/docker/build-push-action.git
synced 2024-11-15 16:23:51 +08: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',
|
||||
|
@ -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'
|
||||
|
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user