]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: cancel previous jobs on ref update 21293/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 10 Nov 2021 15:45:12 +0000 (16:45 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 10 Nov 2021 16:15:35 +0000 (17:15 +0100)
Let's save the environment (and reduce the number of jobs in GH Actions
queues) by cancelling old jobs on a ref update (force push).

See: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency

.github/workflows/build_test.yml
.github/workflows/cifuzz.yml
.github/workflows/linter.yml
.github/workflows/mkosi.yml
.github/workflows/unit_tests.yml

index 763a9b8025c16f19a880e06ddf16cff4d08128d5..ae03f591b3f3a531f21476d34f8d48aa2a223647 100644 (file)
@@ -15,6 +15,9 @@ on:
 jobs:
   build:
     runs-on: ubuntu-20.04
+    concurrency:
+      group: ${{ github.workflow }}-${{ matrix.env.COMPILER }}-${{ matrix.env.COMPILER_VERSION }}-${{ github.ref }}
+      cancel-in-progress: true
     strategy:
       fail-fast: false
       matrix:
index 18476cb641af815406ebd2b98cb2b8e4ec696417..2053c11a0fb72003ca4d54725d2969f3cdf0d290 100644 (file)
@@ -20,6 +20,9 @@ jobs:
   Fuzzing:
     runs-on: ubuntu-latest
     if: github.repository == 'systemd/systemd'
+    concurrency:
+      group: ${{ github.workflow }}-${{ github.ref }}
+      cancel-in-progress: true
     strategy:
       fail-fast: false
       matrix:
index 1136c0523b5f3fa771ab82c88a3743060d47b5a9..2c3c58ad5864c6096ba82eeee8ac92fa07581f54 100644 (file)
@@ -13,6 +13,9 @@ jobs:
   build:
     name: Lint Code Base
     runs-on: ubuntu-latest
+    concurrency:
+      group: ${{ github.workflow }}-${{ github.ref }}
+      cancel-in-progress: true
 
     steps:
       - name: Repo checkout
index 9ae40e316f6c8846d52c6f06c7822d3a5974dc3d..11cb3f63b550e1cb689fd3fc0ce9619458395a18 100644 (file)
@@ -15,6 +15,9 @@ on:
 jobs:
   ci:
     runs-on: ubuntu-20.04
+    concurrency:
+      group: ${{ github.workflow }}-${{ matrix.distro }}-${{ github.ref }}
+      cancel-in-progress: true
     strategy:
       fail-fast: false
       matrix:
index d6c3fafabdc58287dd80cf8694ca0271b809bd13..2bb8400fdf5fbf229e496bdb4915b65880c81d95 100644 (file)
@@ -11,6 +11,9 @@ on:
 jobs:
   build:
     runs-on: ubuntu-20.04
+    concurrency:
+      group: ${{ github.workflow }}-${{ matrix.run_phase }}-${{ github.ref }}
+      cancel-in-progress: true
     strategy:
       fail-fast: false
       matrix: