mirror of
https://github.com/docker/metadata-action.git
synced 2025-06-23 03:07:58 +02:00
Skip and display warning if tag does not match (#59)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
12
dist/index.js
generated
vendored
12
dist/index.js
generated
vendored
@ -518,10 +518,16 @@ class Meta {
|
||||
else {
|
||||
tmatch = vraw.match(tag.attrs['pattern']);
|
||||
}
|
||||
if (tmatch) {
|
||||
vraw = tmatch[tag.attrs['group']];
|
||||
latest = true;
|
||||
if (!tmatch) {
|
||||
core.warning(`${tag.attrs['pattern']} does not match ${vraw}.`);
|
||||
return version;
|
||||
}
|
||||
if (typeof tmatch[tag.attrs['group']] === 'undefined') {
|
||||
core.warning(`Group ${tag.attrs['group']} does not exist for ${tag.attrs['pattern']} pattern.`);
|
||||
return version;
|
||||
}
|
||||
vraw = tmatch[tag.attrs['group']];
|
||||
latest = true;
|
||||
if (version.main == undefined) {
|
||||
version.main = vraw;
|
||||
}
|
||||
|
Reference in New Issue
Block a user