Skip to content

Commit

Permalink
saner
Browse files Browse the repository at this point in the history
  • Loading branch information
Azathothas committed Jan 31, 2025
1 parent b64a800 commit 92438be
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/kill_all_actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,25 @@ jobs:
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
kill_all_actions
{
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
}
export -f kill_all_actions
kill_all_actions ; kill_all_actions ; kill_all_actions
continue-on-error: true

0 comments on commit 92438be

Please sign in to comment.