add clean function (#211)

This commit is contained in:
Oliver King
2022-07-06 16:15:31 -04:00
committed by GitHub
parent 72a09f4051
commit 19d66d6bdb
3 changed files with 32 additions and 5 deletions
+5 -4
View File
@@ -23,7 +23,8 @@ import {parseRouteStrategy, RouteStrategy} from '../types/routeStrategy'
import {ExecOutput} from '@actions/exec'
import {
getWorkflowAnnotationKeyLabel,
getWorkflowAnnotations
getWorkflowAnnotations,
cleanLabel
} from '../utilities/workflowAnnotationUtils'
import {
annotateChildPods,
@@ -214,10 +215,10 @@ async function labelResources(
label: string
) {
const labels = [
`workflowFriendlyName=${normalizeWorkflowStrLabel(
process.env.GITHUB_WORKFLOW
`workflowFriendlyName=${cleanLabel(
normalizeWorkflowStrLabel(process.env.GITHUB_WORKFLOW)
)}`,
`workflow=${label}`
`workflow=${cleanLabel(label)}`
]
checkForErrors([await kubectl.labelFiles(files, labels)], true)