浏览代码

ci: cancel current runs on new trigger

Marc Cornellà 2 年之前
父节点
当前提交
ebfd7cb219
共有 2 个文件被更改,包括 8 次插入0 次删除
  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: 
     branches: 
       - master
       - master
 
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+  cancel-in-progress: true
+
 jobs:
 jobs:
   tests:
   tests:
     name: Run tests
     name: Run tests

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

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