2
0
Fork 0
mirror of https://code.forgejo.org/docker/metadata-action.git synced 2025-10-17 16:31:59 +00:00

Reproduce issue #546: tags input breaks when using # in Git tag or regex

This commit is contained in:
Max Anurin 2025-08-20 15:08:43 +03:00
parent c1e51972af
commit 90b68cf47e
No known key found for this signature in database
GPG key ID: 39653BF8E71E51AC

View file

@ -91,6 +91,44 @@ describe('getInputs', () => {
tags: [],
} as Inputs
],
[
3,
new Map<string, string>([
['tags', 'type=match,pattern=mkdocs-(.*),group=1'],
]),
{
context: ContextSource.workflow,
bakeTarget: 'docker-metadata-action',
flavor: [],
githubToken: '',
images: [],
labels: [],
annotations: [],
sepLabels: '\n',
sepTags: '\n',
sepAnnotations: '\n',
tags: ['type=match,pattern=mkdocs-(.*),group=1'],
} as Inputs
],
[
4,
new Map<string, string>([
['tags', 'type=match,pattern=mkdocs#(.*),group=1'],
]),
{
context: ContextSource.workflow,
bakeTarget: 'docker-metadata-action',
flavor: [],
githubToken: '',
images: [],
labels: [],
annotations: [],
sepLabels: '\n',
sepTags: '\n',
sepAnnotations: '\n',
tags: ['type=match,pattern=mkdocs#(.*),group=1'],
} as Inputs
],
])(
'[%d] given %p as inputs, returns %p',
async (num: number, inputs: Map<string, string>, expected: Inputs) => {