Update remove-failed-jobs.sh

Signed-off-by: Cristian Cezar Moisés <ethicalhacker@riseup.net>
This commit is contained in:
Cristian Cezar Moisés
2025-01-03 23:01:16 +00:00
committed by GitHub
parent d38274acae
commit 2217959242

View File

@@ -7,7 +7,12 @@ gh_bulk_delete_workflow_runs() {
return 1
fi
runs=$(gh api repos/$repo/actions/runs --paginate | jq -r '.workflow_runs[] | select(.conclusion == "cancelled" or .conclusion == "failure" or .conclusion == "timed_out") | .id')
runs=$(gh api repos/$repo/actions/runs --paginate |
jq -r '.workflow_runs[] |
select(.conclusion == "cancelled" or
.conclusion == "failure" or
.conclusion == "timed_out") |
.id')
while IFS= read -r run; do
echo "Deleting run https://github.com/$repo/actions/runs/$run"
@@ -17,4 +22,4 @@ gh_bulk_delete_workflow_runs() {
echo "All workflow runs for $repo have been deleted."
}
gh_bulk_delete_workflow_runs $1
gh_bulk_delete_workflow_runs "$1"