Skip to content

Commit

Permalink
fix: try to cancel the main workflow repeatedly
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Sep 17, 2022
1 parent 2ff1152 commit 9629ab1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ jobs:
git commit --amend -m "chore: setup project from template"
git push -f origin HEAD
for id in $(gh api "/repos/$GH_REPOSITORY/actions/workflows/main.yml/runs?status=in_progress" | jq -r '.workflow_runs[].id'); do
gh api -XPOST "/repos/$GH_REPOSITORY/actions/runs/$id/cancel"
for i in {1..10}; do
for id in $(gh api "/repos/$GH_REPOSITORY/actions/workflows/main.yml/runs?status=in_progress" | jq -r '.workflow_runs[].id'); do
gh api -XPOST "/repos/$GH_REPOSITORY/actions/runs/$id/cancel"
exit 0
done
sleep 3
done

0 comments on commit 9629ab1

Please sign in to comment.