]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Set workflows to cancel jobs on the same branch
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 11 Feb 2022 00:41:09 +0000 (01:41 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 11 Feb 2022 00:56:41 +0000 (01:56 +0100)
Docs at https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

.github/workflows/docs.yml
.github/workflows/lint.yml
.github/workflows/tests.yml

index 72f7a068ce8f9613631e0c750ecb734532560e19..1dd1e94c9dc5e88794d57173a4b7ca437404f1d5 100644 (file)
@@ -6,6 +6,10 @@ on:
       # This should match the DOC3_BRANCH value in the psycopg-website Makefile
       - master
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref_name }}
+  cancel-in-progress: true
+
 jobs:
   docs:
     runs-on: ubuntu-latest
index 99b4f7f98158c9e95dccb5ce9f108e00e9673710..8d0ad6e4ccc207fe3134525cb7d96dbb9535fa82 100644 (file)
@@ -8,6 +8,10 @@ on:
       - "*"
   pull_request:
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref_name }}
+  cancel-in-progress: true
+
 jobs:
   lint:
     runs-on: ubuntu-20.04
index b423206a5c948c06cddbfc04573c8b83d89598ab..160f2f5a8879d834fc99ee053787eb8ca54886ad 100644 (file)
@@ -8,6 +8,11 @@ on:
       - "*"
   pull_request:
 
+concurrency:
+  # Cancel older requests of the same workflow in the same branch.
+  group: ${{ github.workflow }}-${{ github.ref_name }}
+  cancel-in-progress: true
+
 jobs:
 
   linux:  # {{{