1
0
mirror of synced 2026-01-08 03:01:54 -05:00

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
committed by GitHub
parent c7cc44b1ec
commit 60d3d665dd

View File

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