We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ec80c3 commit ef7eee9Copy full SHA for ef7eee9
__tests__/context.test.ts
@@ -63,7 +63,24 @@ describe('getInputs', () => {
63
sepTags: ',',
64
tags: [],
65
} as Inputs
66
- ]
+ ],
67
+ [
68
+ 2,
69
+ new Map<string, string>([
70
+ ['images', 'moby/buildkit\n#comment\nghcr.io/moby/mbuildkit'],
71
+ ]),
72
+ {
73
+ context: ContextSource.workflow,
74
+ bakeTarget: 'docker-metadata-action',
75
+ flavor: [],
76
+ githubToken: '',
77
+ images: ['moby/buildkit', 'ghcr.io/moby/mbuildkit'],
78
+ labels: [],
79
+ sepLabels: '\n',
80
+ sepTags: '\n',
81
+ tags: [],
82
+ } as Inputs
83
84
])(
85
'[%d] given %p as inputs, returns %p',
86
async (num: number, inputs: Map<string, string>, expected: Inputs) => {
src/context.ts
@@ -19,10 +19,10 @@ export interface Inputs {
19
export function getInputs(): Inputs {
20
return {
21
context: (core.getInput('context') || ContextSource.workflow) as ContextSource,
22
- images: Util.getInputList('images', {ignoreComma: true}),
23
- tags: Util.getInputList('tags', {ignoreComma: true}),
24
- flavor: Util.getInputList('flavor', {ignoreComma: true}),
25
- labels: Util.getInputList('labels', {ignoreComma: true}),
+ images: Util.getInputList('images', {ignoreComma: true, comment: '#'}),
+ tags: Util.getInputList('tags', {ignoreComma: true, comment: '#'}),
+ flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#'}),
+ labels: Util.getInputList('labels', {ignoreComma: true, comment: '#'}),
26
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
27
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
28
bakeTarget: core.getInput('bake-target') || `docker-metadata-action`,
0 commit comments