- add additional messages in case of no or just a single tag

This commit is contained in:
Mike Penz
2021-05-13 14:52:49 +02:00
parent 31d30f3069
commit 1e433ff45a
3 changed files with 12 additions and 1 deletions
Generated Vendored
+6
View File
@@ -974,6 +974,12 @@ class Tags {
return tags[0]; return tags[0];
} }
catch (error) { catch (error) {
if (tags.length < 1) {
core.warning(`⚠️ Only one tag found for the given repository`);
}
else if (tags.length < 0) {
core.warning(`⚠️ No tag found for the given repository`);
}
return null; return null;
} }
}); });
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+5
View File
@@ -81,6 +81,11 @@ export class Tags {
} }
return tags[0] return tags[0]
} catch (error) { } catch (error) {
if (tags.length < 1) {
core.warning(`⚠️ Only one tag found for the given repository`)
} else if (tags.length < 0) {
core.warning(`⚠️ No tag found for the given repository`)
}
return null return null
} }
} }