From: Patrick Donnelly Date: Thu, 30 Jul 2026 16:08:23 +0000 (-0400) Subject: .github/workflows: simplify and avoid external dependency X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb6b7e7a01f3c838ab30a743c1761af87e4aa798;p=ceph.git .github/workflows: simplify and avoid external dependency 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 --- diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml index b40394e049ab..3b9a0cfefdbe 100644 --- a/.github/workflows/check-license.yml +++ b/.github/workflows/check-license.yml @@ -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