Merge pull request #249 from crazy-max/trim-inputlist-items
Trim input list items
This commit is contained in:
		
						commit
						a6ea296fed
					
				@ -166,6 +166,21 @@ describe('getArgs', () => {
 | 
				
			|||||||
        'https://github.com/docker/build-push-action.git#test-jest'
 | 
					        'https://github.com/docker/build-push-action.git#test-jest'
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
 | 
					    [
 | 
				
			||||||
 | 
					      '0.4.2',
 | 
				
			||||||
 | 
					      new Map<string, string>([
 | 
				
			||||||
 | 
					        ['tags', 'name/app:7.4, name/app:latest'],
 | 
				
			||||||
 | 
					      ]),
 | 
				
			||||||
 | 
					      [
 | 
				
			||||||
 | 
					        'buildx',
 | 
				
			||||||
 | 
					        'build',
 | 
				
			||||||
 | 
					        '--tag', 'name/app:7.4',
 | 
				
			||||||
 | 
					        '--tag', 'name/app:latest',
 | 
				
			||||||
 | 
					        '--iidfile', '/tmp/.docker-build-push-jest/iidfile',
 | 
				
			||||||
 | 
					        '--file', 'Dockerfile',
 | 
				
			||||||
 | 
					        'https://github.com/docker/build-push-action.git#test-jest'
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
      '0.4.2',
 | 
					      '0.4.2',
 | 
				
			||||||
      new Map<string, string>([
 | 
					      new Map<string, string>([
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							@ -12266,7 +12266,7 @@ function getInputList(name, ignoreComma) {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            res.push(output.join(','));
 | 
					            res.push(output.join(','));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return res.filter(item => item);
 | 
					        return res.filter(item => item).map(pat => pat.trim());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
exports.getInputList = getInputList;
 | 
					exports.getInputList = getInputList;
 | 
				
			||||||
 | 
				
			|||||||
@ -183,7 +183,7 @@ export async function getInputList(name: string, ignoreComma?: boolean): Promise
 | 
				
			|||||||
    res.push(output.join(','));
 | 
					    res.push(output.join(','));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return res.filter(item => item);
 | 
					  return res.filter(item => item).map(pat => pat.trim());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const asyncForEach = async (array, callback) => {
 | 
					export const asyncForEach = async (array, callback) => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user