]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - .github/workflows/codeql-analysis.yml
Merge pull request #13608 from romeroalx/look-for-binaries-pr
[thirdparty/pdns.git] / .github / workflows / codeql-analysis.yml
index a51deb76cf48859b7446b0bdbaf1272e3d24476d..b728d351363f3cbc8fbf870a25752455181862f3 100644 (file)
@@ -250,7 +250,7 @@ jobs:
 
   check-clang-tidy:
     needs: analyze
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     name: Check whether clang-tidy succeeded
     steps:
       - run: |
@@ -266,3 +266,14 @@ jobs:
             echo "::error::Rec clang-tidy failed"
             exit 1
           fi
+
+  check-for-binaries:
+    runs-on: ubuntu-22.04
+    name: Force failure in case there are binaries present in a pull request
+    if: ${{ github.event_name == 'pull_request' }}
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v4
+      with:
+        fetch-depth: 2
+    - run: if [[ "$(file -i --dereference $(git diff --name-only HEAD^..HEAD) | grep binary | grep -v 'image/' | grep -v 'inode/x-empty')" != "" ]]; then exit 1; fi