Skip to content

Commit

Permalink
Merge pull request #249 from crazy-max/trim-inputlist-items
Browse files Browse the repository at this point in the history
Trim input list items
  • Loading branch information
crazy-max committed Dec 5, 2020
2 parents 22b2fa6 + 13137a8 commit a6ea296
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions __tests__/context.test.ts
Expand Up @@ -166,6 +166,21 @@ describe('getArgs', () => {
'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',
new Map<string, string>([
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/context.ts
Expand Up @@ -183,7 +183,7 @@ export async function getInputList(name: string, ignoreComma?: boolean): Promise
res.push(output.join(','));
}

return res.filter(item => item);
return res.filter(item => item).map(pat => pat.trim());
}

export const asyncForEach = async (array, callback) => {
Expand Down

0 comments on commit a6ea296

Please sign in to comment.