]> 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:50:58 +0000 (01:50 +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 b9a50aaefee01c3432429557f57fda2db8e345e1..adc29cf4d8f381be336caec5903aa4ea49d87ccc 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 3e6ec0565ac1d2e0c41ce7267ef544256cd81bea..c01b99adf9d4ba52257b55ffb805c769dc1d17ae 100644 (file)
@@ -10,6 +10,11 @@ on:
   schedule:
     - cron: '48 6 * * *'
 
+concurrency:
+  # Cancel older requests of the same workflow in the same branch.
+  group: ${{ github.workflow }}-${{ github.ref_name }}
+  cancel-in-progress: true
+
 jobs:
 
   linux:  # {{{