mirror docker/metadata-action@v5
This commit is contained in:
+5
-2
@@ -104,10 +104,10 @@ export function Parse(s: string): Tag {
|
||||
const value = parts[1];
|
||||
switch (key) {
|
||||
case 'type': {
|
||||
if (!Object.values(Type).includes(value)) {
|
||||
if (!Object.values(Type).includes(value as Type)) {
|
||||
throw new Error(`Unknown tag type attribute: ${value}`);
|
||||
}
|
||||
tag.type = value;
|
||||
tag.type = value as Type;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@@ -137,6 +137,9 @@ export function Parse(s: string): Tag {
|
||||
if (!Object.prototype.hasOwnProperty.call(tag.attrs, 'value')) {
|
||||
tag.attrs['value'] = '';
|
||||
}
|
||||
if (!Object.prototype.hasOwnProperty.call(tag.attrs, 'match')) {
|
||||
tag.attrs['match'] = '';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Type.Match: {
|
||||
|
||||
Reference in New Issue
Block a user