Skip to content
Discussion options

You must be logged in to vote

Apparently if you delete all the runs for a given workflow, the workflow will then disappear from the list as well. You can delete it manually from the UI or this is the script that I used to clear all runs for a given workflow. Hope it helps!

Note that it needsgh and jq cli installed

OWNER=<your user/org name>
REPO=<repo name>

# list workflows
gh api -X GET /repos/$OWNER/$REPO/actions/workflows | jq '.workflows[] | .name,.id'

# copy the ID of the workflow you want to clear and set it
WORKFLOW_ID=<workflow id>

# list runs
gh api -X GET /repos/$OWNER/$REPO/actions/workflows/$WORKFLOW_ID/runs | jq '.workflow_runs[] | .id'

# delete runs (you'll have to run this multiple times if there's …

Replies: 10 comments 12 replies

Comment options

You must be logged in to vote
10 replies
@AndreyBig567
Comment options

@dgandiaga
Comment options

@jinluchang
Comment options

@povisenko
Comment options

@edtep-relayfi
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@egk-ts
Comment options

@Papooch
Comment options

Answer selected by egk-ts
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback Share your thoughts and suggestions on GitHub features and improvements