-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21317a0
commit ef22a5d
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!!WARNING: This kills All actions (all kinds) in the entire repository## | ||
name: 🔫 Kill All Actions 👾 | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: write | ||
statuses: write | ||
steps: | ||
- name: Kill | ||
run: | | ||
##presets | ||
set +x ; set +e | ||
#-------------# | ||
##Stale | ||
gh run list --repo "${GITHUB_REPOSITORY}" --json databaseId --jq '.[].databaseId' --limit '1000' --status 'stale' |\ | ||
xargs -I "{}" gh run cancel "{}" --repo "${GITHUB_REPOSITORY}" & | ||
##Queued | ||
gh run list --repo "${GITHUB_REPOSITORY}" --json databaseId --jq '.[].databaseId' --limit '1000' --status 'queued' |\ | ||
xargs -I "{}" gh run cancel "{}" --repo "${GITHUB_REPOSITORY}" & | ||
##Requested | ||
gh run list --repo "${GITHUB_REPOSITORY}" --json databaseId --jq '.[].databaseId' --limit '1000' --status 'requested' |\ | ||
xargs -I "{}" gh run cancel "{}" --repo "${GITHUB_REPOSITORY}" & | ||
##Waiting | ||
gh run list --repo "${GITHUB_REPOSITORY}" --json databaseId --jq '.[].databaseId' --limit '1000' --status 'waiting' |\ | ||
xargs -I "{}" gh run cancel "{}" --repo "${GITHUB_REPOSITORY}" & | ||
##In_Progress (Must be last) | ||
gh run list --repo "${GITHUB_REPOSITORY}" --json databaseId --jq '.[].databaseId' --limit '1000' --status 'in_progress' |\ | ||
xargs -I "{}" gh run cancel "{}" --repo "${GITHUB_REPOSITORY}" & | ||
##Wait | ||
wait ; echo | ||
continue-on-error: true |