A fish oneliner to delete the latest workflow runs of a repo.
Install the GitHub CLI and replace <owner>/<repository>
with your repository.
You can also change ?per_page=100
with the number of runs you want to delete.
A fish oneliner to delete the latest workflow runs of a repo.
Install the GitHub CLI and replace <owner>/<repository>
with your repository.
You can also change ?per_page=100
with the number of runs you want to delete.
begin; set -lx REPO <owner>/<repository>; gh api "/repos/$REPO/actions/runs?per_page=100" -q ".workflow_runs.[].id" | xargs -L1 -- bash -c "gh api --method DELETE /repos/$REPO/actions/runs/\$0"; end |