You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created the below script just to clean up for now. Basically, it launches 10 requests for time.
#!/bin/bash
OWNER="myuser"
REPO="myrepo"
workflow_ids=($(gh api repos/$OWNER/$REPO/actions/workflows | jq '.workflows[] | .id'))
for workflow_id in "${workflow_ids[@]}"; do
echo "Listing runs for the workflow ID $workflow_id"
run_ids=( $(gh api repos/$OWNER/$REPO/actions/workflows/$workflow_id/runs --paginate | jq '.workflow_runs[].id') )
_id=0
_co=1
for run_id in "${run_ids[@]}"; do
echo "[$_id] Deleting Run ID $run_id ($_co of ${#run_ids[@]})"
(gh api repos/$OWNER/$REPO/actions/runs/$run_id -X DELETE >/dev/null) &
if [ $_id -eq 10 ]; then
echo "Waiting delete all 10..."
wait
_id=0
continue
fi
let "_id+=1"
let "_co+=1"
done
done
I have 10k records, I want to delete everything at once. Yes, I can press fn + up and wait couple mins, then press tab and...
So will be great to have 'select all' button and something like filters (select old runs), etc.
Thank you
The text was updated successfully, but these errors were encountered: