Continue-on-error strategy on failure to delete a workflow run (#42035)

This commit is contained in:
Peter Bengtsson 2023-09-05 13:18:17 -04:00 коммит произвёл GitHub
Родитель c7cc44b1ec
Коммит 60d3d665dd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -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++