Browse Source

ci: cancel current runs on new trigger

Marc Cornellà 2 years ago
parent
commit
ebfd7cb219
2 changed files with 8 additions and 0 deletions
  1. 4 0
      .github/workflows/main.yml
  2. 4 0
      .github/workflows/project.yml

+ 4 - 0
.github/workflows/main.yml

@@ -10,6 +10,10 @@ on:
     branches: 
       - master
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+  cancel-in-progress: true
+
 jobs:
   tests:
     name: Run tests

+ 4 - 0
.github/workflows/project.yml

@@ -5,6 +5,10 @@ on:
   pull_request_target:
     types: [opened, synchronize]
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+  cancel-in-progress: true
+
 jobs:
   add-to-project:
     name: Add to project