]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
.github/workflows: simplify and avoid external dependency 70722/head
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 30 Jul 2026 16:08:23 +0000 (12:08 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Thu, 30 Jul 2026 16:09:04 +0000 (12:09 -0400)
Github has a native tool to obtain the PR diff.

This also resolves a warning from the action log:

    2026-07-30T16:02:20.3415885Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
.github/workflows/check-license.yml

index b40394e049abcea0099b0868622749361574b72a..3b9a0cfefdbecebbbc1be9198a0c772d6f91b28d 100644 (file)
@@ -17,8 +17,12 @@ jobs:
     name: "Check for Incompatible Licenses"
     runs-on: ubuntu-latest
     steps:
-    - name: Check Pull Request
-      uses: JJ/github-pr-contains-action@526dfe784d8604ea1c39b6c26609074de95b1ffd  # releases/v14.1
-      with:
-        github-token: ${{github.token}}
-        diffDoesNotContain: "GNU General Public License"
+    - name: Check PR Diff for License
+      env:
+        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      run: |
+        DIFF=$(gh pr diff ${{ github.event.pull_request.number }} -R ${{ github.repository }})
+        if echo "$DIFF" | grep -qi "GNU General Public License"; then
+          echo "Error: Incompatible license 'GNU General Public License' found in PR diff."
+          exit 1
+        fi