The script will remove failed and cancelled workflow runs from your GitHub Action workflow history log.
- GitHub CLI installed.
- Save
delete-failed-ga-runs.shto a local folder. chmod +x delete-failed-ga-runs.shso you can run the script.
delete-failed-ga-runs.sh [-d] <repository> <workflow-name>
-d: Do a dry run, i.e. just show me what's going to happen, but don't delete anything.<repository>: owner/repo-name<workflow-name>: the workflow file name, e.g.:myworkflow.yml