mirror of
https://github.com/docker/metadata-action.git
synced 2024-12-22 15:45:35 +00:00
enable comments to avoid breaking change with current impl
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
8ec80c3be6
commit
ef7eee951a
|
@ -63,7 +63,24 @@ describe('getInputs', () => {
|
||||||
sepTags: ',',
|
sepTags: ',',
|
||||||
tags: [],
|
tags: [],
|
||||||
} as Inputs
|
} as Inputs
|
||||||
]
|
],
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
new Map<string, string>([
|
||||||
|
['images', 'moby/buildkit\n#comment\nghcr.io/moby/mbuildkit'],
|
||||||
|
]),
|
||||||
|
{
|
||||||
|
context: ContextSource.workflow,
|
||||||
|
bakeTarget: 'docker-metadata-action',
|
||||||
|
flavor: [],
|
||||||
|
githubToken: '',
|
||||||
|
images: ['moby/buildkit', 'ghcr.io/moby/mbuildkit'],
|
||||||
|
labels: [],
|
||||||
|
sepLabels: '\n',
|
||||||
|
sepTags: '\n',
|
||||||
|
tags: [],
|
||||||
|
} as Inputs
|
||||||
|
],
|
||||||
])(
|
])(
|
||||||
'[%d] given %p as inputs, returns %p',
|
'[%d] given %p as inputs, returns %p',
|
||||||
async (num: number, inputs: Map<string, string>, expected: Inputs) => {
|
async (num: number, inputs: Map<string, string>, expected: Inputs) => {
|
||||||
|
|
|
@ -19,10 +19,10 @@ export interface Inputs {
|
||||||
export function getInputs(): Inputs {
|
export function getInputs(): Inputs {
|
||||||
return {
|
return {
|
||||||
context: (core.getInput('context') || ContextSource.workflow) as ContextSource,
|
context: (core.getInput('context') || ContextSource.workflow) as ContextSource,
|
||||||
images: Util.getInputList('images', {ignoreComma: true}),
|
images: Util.getInputList('images', {ignoreComma: true, comment: '#'}),
|
||||||
tags: Util.getInputList('tags', {ignoreComma: true}),
|
tags: Util.getInputList('tags', {ignoreComma: true, comment: '#'}),
|
||||||
flavor: Util.getInputList('flavor', {ignoreComma: true}),
|
flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#'}),
|
||||||
labels: Util.getInputList('labels', {ignoreComma: true}),
|
labels: Util.getInputList('labels', {ignoreComma: true, comment: '#'}),
|
||||||
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
|
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
|
||||||
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
|
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
|
||||||
bakeTarget: core.getInput('bake-target') || `docker-metadata-action`,
|
bakeTarget: core.getInput('bake-target') || `docker-metadata-action`,
|
||||||
|
|
Loading…
Reference in a new issue