Add concurrency group for more workflows (#63606)
authorzhouzhuojie <zhouzhuojie@gmail.com>
Thu, 19 Aug 2021 22:37:10 +0000 (15:37 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 19 Aug 2021 22:39:28 +0000 (15:39 -0700)
Summary:
Fixes unnecessary duplicated workflows runs

![image](https://user-images.githubusercontent.com/658840/130146332-ecf54e49-3538-49c1-88de-b099f1c1e41f.png)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/63606

Reviewed By: malfet, mruberry

Differential Revision: D30436889

Pulled By: zhouzhuojie

fbshipit-source-id: aafbad1edc45e3ab9bceb00e8f3b4204f18e43d0

.github/workflows/add_annotations.yml
.github/workflows/auto_label.yml

index 40c2677aaf80d012f028f8bebc793aa951374114..9bb3c1b46e7b4139c13079f8b8b5617dc14a20b8 100644 (file)
@@ -7,6 +7,12 @@ on:
     workflows:
       - Lint
 
+
+concurrency:
+  group: add-annotations-${{ github.event.pull_request.number || github.sha }}
+  cancel-in-progress: true
+
+
 jobs:
   annotate:
     if: ${{ github.repository_owner == 'pytorch' }}
index 24fc02eff1439e0d318ef5cb04dfa25bafe9e1a1..1616ea9c90b8aa520136f72fa23fe804143563ba 100644 (file)
@@ -6,6 +6,12 @@ on:
   pull_request_target:
     types: [edited, opened, synchronize, reopened]
 
+
+concurrency:
+  group: auto-label-${{ github.event.pull_request.number || github.sha }}
+  cancel-in-progress: true
+
+
 jobs:
   auto-label-rocm:
     if: ${{ github.repository_owner == 'pytorch' }}