feat: add dd.MM.yyyy date formatting, default label number, and improve variable padding safety in label rendering
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
This commit is contained in:
@@ -19,8 +19,8 @@ function applyVars(template: string, vars: Record<string, string>): string {
|
||||
if (colonIdx !== -1) {
|
||||
const varName = key.slice(0, colonIdx);
|
||||
const width = parseInt(key.slice(colonIdx + 1), 10);
|
||||
if (!isNaN(width) && varName in vars) {
|
||||
return vars[varName].padStart(width, '0');
|
||||
if (!isNaN(width)) {
|
||||
return (vars[varName] ?? '').padStart(width, '0');
|
||||
}
|
||||
}
|
||||
return vars[key] ?? `{${key}}`;
|
||||
|
||||
Reference in New Issue
Block a user