Skip to content

Instantly share code, notes, and snippets.

@Xunnamius
Created December 3, 2021 02:48
Show Gist options
  • Save Xunnamius/8e7d98bf48ade024fe79eb226b8fc491 to your computer and use it in GitHub Desktop.
Save Xunnamius/8e7d98bf48ade024fe79eb226b8fc491 to your computer and use it in GitHub Desktop.
Completely clear / delete all the GitHub Actions workflow run history of a GitHub repository
for a in $(curl -qs "https://api.github.com/repos/<OWNER>/<REPO>/actions/runs" | jq -r '.workflow_runs[].id'); do curl -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: token <TOKEN>" "https://api.github.com/repos/<OWNER>/<REPO>/actions/runs/$a"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment