mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-23 21:19:28 +08:00
Added fallback filename if workflow fails to get github filepath due to runner issues
This commit is contained in:
@@ -150,8 +150,15 @@ export async function annotateAndLabelResources(
|
||||
resourceTypes: Resource[],
|
||||
allPods: any
|
||||
) {
|
||||
const defaultWorkflowFileName = 'k8s-deploy-failed-workflow-annotation'
|
||||
const githubToken = core.getInput('token')
|
||||
const workflowFilePath = await getWorkflowFilePath(githubToken)
|
||||
let workflowFilePath
|
||||
try {
|
||||
workflowFilePath = await getWorkflowFilePath(githubToken)
|
||||
} catch (ex) {
|
||||
core.warning(`Failed to extract workflow file name: ${ex}`)
|
||||
workflowFilePath = defaultWorkflowFileName
|
||||
}
|
||||
|
||||
const deploymentConfig = await getDeploymentConfig()
|
||||
const annotationKeyLabel = getWorkflowAnnotationKeyLabel()
|
||||
|
||||
Reference in New Issue
Block a user