зеркало из https://github.com/github/docs.git
Continue-on-error strategy on failure to delete a workflow run (#42035)
This commit is contained in:
Родитель
c7cc44b1ec
Коммит
60d3d665dd
|
@ -192,20 +192,24 @@ async function deleteWorkflowRuns(
|
|||
)
|
||||
assert(status === 204, `Unexpected status deleting logs for run ${run.id}: ${status}`)
|
||||
} catch (error) {
|
||||
console.warn('Error trying to delete the logs for run', run.id, error.message)
|
||||
console.warn('ERROR trying to delete the logs for run', run.id, error.message)
|
||||
}
|
||||
}
|
||||
|
||||
if (!dryRun) {
|
||||
const { status } = await github.request(
|
||||
'DELETE /repos/{owner}/{repo}/actions/runs/{run_id}',
|
||||
{
|
||||
owner,
|
||||
repo,
|
||||
run_id: run.id,
|
||||
},
|
||||
)
|
||||
assert(status === 204, `Unexpected status deleting logs for run ${run.id}: ${status}`)
|
||||
try {
|
||||
const { status } = await github.request(
|
||||
'DELETE /repos/{owner}/{repo}/actions/runs/{run_id}',
|
||||
{
|
||||
owner,
|
||||
repo,
|
||||
run_id: run.id,
|
||||
},
|
||||
)
|
||||
assert(status === 204, `Unexpected status deleting logs for run ${run.id}: ${status}`)
|
||||
} catch (error) {
|
||||
console.warn('ERROR trying to delete run', run.id, error.message)
|
||||
}
|
||||
}
|
||||
|
||||
deletions++
|
||||
|
|
Загрузка…
Ссылка в новой задаче