Skip to content

Instantly share code, notes, and snippets.

@michaelsanford
Created October 13, 2021 04:16
Show Gist options
  • Save michaelsanford/155db092767d5373ba8bce7ea98f4783 to your computer and use it in GitHub Desktop.
Save michaelsanford/155db092767d5373ba8bce7ea98f4783 to your computer and use it in GitHub Desktop.
Batch Delete GitHub Workflow Runs
$user = "your user/org"
$repo = "repo"
(gh api repos/$user/$repo/actions/runs | ConvertFrom-Json).workflow_runs |
%{ $_.id } |
%{ gh api repos/$user/$repo/actions/runs/$_ -X DELETE }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment