mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-07-01 01:39:26 +08:00
Fixing label values of workflow names with spaces (#134)
This commit is contained in:
@@ -169,6 +169,12 @@ export async function getDeploymentConfig(): Promise<DeploymentConfig> {
|
||||
return Promise.resolve(deploymentConfig);
|
||||
}
|
||||
|
||||
export function normaliseWorkflowStrLabel(workflowName: string): string {
|
||||
workflowName = workflowName.startsWith('.github/workflows/') ?
|
||||
workflowName.replace(".github/workflows/", "") : workflowName;
|
||||
return workflowName.replace(/ /g, "_");
|
||||
}
|
||||
|
||||
export function sleep(timeout: number) {
|
||||
return new Promise(resolve => setTimeout(resolve, timeout));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user