]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
github: Prevent duplicate CI runs
authorTobias Brunner <tobias@strongswan.org>
Fri, 11 Dec 2020 15:30:04 +0000 (16:30 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 15 Dec 2020 09:42:43 +0000 (10:42 +0100)
This cancels previous runs of the same branch and skips runs of the same
content (e.g. after merges or tags).

.github/workflows/android.yml
.github/workflows/lgtm.yml
.github/workflows/linux.yml
.github/workflows/macos.yml
.github/workflows/sonarcloud.yml
.github/workflows/windows.yml

index 567c50772e8ed772ec3f35d2638671f25c99eb93..b4f1bace002747562889eee9c528462d0b74bb1c 100644 (file)
@@ -10,7 +10,19 @@ env:
   OS_NAME: linux
 
 jobs:
+  pre-check:
+    runs-on: ubuntu-latest
+    outputs:
+      should_skip: ${{ steps.skip-check.outputs.should_skip }}
+    steps:
+      - id: skip-check
+        uses: fkirc/skip-duplicate-actions@master
+        with:
+          concurrent_skipping: 'same_content'
+
   android:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-latest
     env:
       TEST: android
index 8d6fd54a019c3bfed16056590de47c823c558c49..f527b296643c8c1943f431e00096839adbe43f85 100644 (file)
@@ -6,7 +6,19 @@ env:
   OS_NAME: linux
 
 jobs:
+  pre-check:
+    runs-on: ubuntu-latest
+    outputs:
+      should_skip: ${{ steps.skip-check.outputs.should_skip }}
+    steps:
+      - id: skip-check
+        uses: fkirc/skip-duplicate-actions@master
+        with:
+          concurrent_skipping: 'same_content'
+
   lgtm:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-latest
     env:
       TEST: lgtm
index fc51cd35c7baf832738560ae6f3b958d6e250147..442628b7b5a463bcb7deab612c84596728f6fa70 100644 (file)
@@ -13,7 +13,19 @@ env:
   OS_NAME: linux
 
 jobs:
+  pre-check:
+    runs-on: ubuntu-latest
+    outputs:
+      should_skip: ${{ steps.skip-check.outputs.should_skip }}
+    steps:
+      - id: skip-check
+        uses: fkirc/skip-duplicate-actions@master
+        with:
+          concurrent_skipping: 'same_content'
+
   latest:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-latest
     strategy:
       matrix:
@@ -72,6 +84,8 @@ jobs:
           retention-days: 5
 
   crypto-plugins:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-latest
     strategy:
       matrix:
@@ -108,6 +122,8 @@ jobs:
           retention-days: 5
 
   xenial:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-16.04
     strategy:
       matrix:
index 1528f3f9e3fe90e2018dd1b14623c78657f88bbe..c89678a558e9e69c302c7f17a0112b0f26132f96 100644 (file)
@@ -10,7 +10,19 @@ env:
   OS_NAME: macos
 
 jobs:
+  pre-check:
+    runs-on: ubuntu-latest
+    outputs:
+      should_skip: ${{ steps.skip-check.outputs.should_skip }}
+    steps:
+      - id: skip-check
+        uses: fkirc/skip-duplicate-actions@master
+        with:
+          concurrent_skipping: 'same_content'
+
   macos:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: macos-latest
     env:
       TEST: macos
index aa6a411e2c93c99a2bb78d8eb71f2da1a5892788..293cbe27d0014519bb71f665a3d4b88c26326228 100644 (file)
@@ -9,7 +9,19 @@ env:
   OS_NAME: linux
 
 jobs:
+  pre-check:
+    runs-on: ubuntu-latest
+    outputs:
+      should_skip: ${{ steps.skip-check.outputs.should_skip }}
+    steps:
+      - id: skip-check
+        uses: fkirc/skip-duplicate-actions@master
+        with:
+          concurrent_skipping: 'same_content'
+
   sonarcloud:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-latest
     env:
       TEST: sonarcloud
index 073bd274ad473584ead6410f716bca45b97e8c58..31334c504afc0514043adc8f23277dc237af996c 100644 (file)
@@ -13,7 +13,19 @@ env:
   MONOLITHIC: yes
 
 jobs:
+  pre-check:
+    runs-on: ubuntu-latest
+    outputs:
+      should_skip: ${{ steps.skip-check.outputs.should_skip }}
+    steps:
+      - id: skip-check
+        uses: fkirc/skip-duplicate-actions@master
+        with:
+          concurrent_skipping: 'same_content'
+
   cross-compile:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-latest
     strategy:
       matrix: