github: Prevent duplicate CI runs
[strongswan.git] / .github / workflows / sonarcloud.yml
index aa6a411..293cbe2 100644 (file)
@@ -9,7 +9,19 @@ env:
   OS_NAME: linux
 
 jobs:
   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:
   sonarcloud:
+    needs: pre-check
+    if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
     runs-on: ubuntu-latest
     env:
       TEST: sonarcloud
     runs-on: ubuntu-latest
     env:
       TEST: sonarcloud