Skip to content

Commit

Permalink
feat: cancel main workflow during initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Sep 17, 2022
1 parent 77eaafd commit 6102af9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
run: |
set -e
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"
done
package_name=$(basename "$PWD" | sed "s/[^a-zA-Z0-9]/_/g" | tr '[:upper:]' '[:lower:]')
repo=$(gh api "/repos/$GH_REPOSITORY")
Expand Down

0 comments on commit 6102af9

Please sign in to comment.