Last active
August 10, 2023 16:17
-
-
Save retyui/ab8a171b7489d9f83880a9fcb63f58af to your computer and use it in GitHub Desktop.
Revisions
-
retyui revised this gist
Aug 10, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,5 +41,5 @@ gh api "repos/$user/$repo/actions/runs?workflow_id=21456768" gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | "\(.id)"' | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | "\(.id)"' > ids.txt cat ids.txt | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE ``` -
retyui revised this gist
Aug 10, 2023 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,10 +6,10 @@ export user=NameOrOrgName export repo=RepoName gh api repos/$user/$repo/actions/runs --paginate -q '.workflow_runs[] | "\(.id)"' | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | "\(.id)"' | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE gh api repos/$user/$repo/actions/runs?created=2022-06-15..2022-07-16 @@ -38,8 +38,8 @@ gh api "repos/$user/$repo/actions/runs?workflow_id=21456768" gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | "\(.id)"' | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | "\(.id)"' > ids.txt cat ids.txs | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE ``` -
retyui renamed this gist
Aug 1, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
retyui created this gist
Aug 1, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ # Simple way to remove all workflow runs in Github Actions: ```bash export user=NameOrOrgName export repo=RepoName gh api repos/$user/$repo/actions/runs --paginate -q '.workflow_runs[] | select(.workflow_id = 21456768) | "\(.id)"' | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | select(.workflow_id == 21456768) | "\(.id)"' | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE gh api repos/$user/$repo/actions/runs?created=2022-06-15..2022-07-16 gh api "repos/$user/$repo/actions/runs?workflow_id=21456768" { "id": 2677488357, "name": "aaaa", "node_id": "WFR_kwLOFhRH7c6flzrl", "head_branch": "name", "head_sha": "e90657391639ee0d1f645ca83bb7ef1e1218ed32", "path": ".github/workflows/name.yml", "run_number": 4759, "event": "pull_request", "status": "completed", "conclusion": "success", "workflow_id": 21456768, "check_suite_id": 7375336252, "check_suite_node_id": "CS_kwDOFhRH7c8AAAABt5qzPA", "url": "https://api.github.com/repos/name/repo/actions/runs/2677488357", "html_url": "https://github.com/name/repo/actions/runs/2677488357", "pull_requests": [], "created_at": "2022-07-15T14:35:25Z", "updated_at": "2022-07-15T14:49:51Z", gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | select(.workflow_id == 21456768) | "\(.id)"' | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE gh api "repos/$user/$repo/actions/runs?created=*..2022-07-16" --paginate -q '.workflow_runs[] | select(.workflow_id == 21456768) | "\(.id)"' > ids.txt cat ids.txs | xargs -n1 -I % gh api repos/$user/$repo/actions/runs/% -X DELETE ```