From 7fce452c894025ca712fb3ee18dc2c1bd045945e Mon Sep 17 00:00:00 2001 From: Brett Mastbergen Date: Fri, 17 Oct 2025 12:52:16 -0400 Subject: [PATCH] github actions: Use reusable validate kernel commits workflow Simplifies the workflow to use the reusable workflow defined in main branch. This reduces duplication and makes the workflow easier to maintain across multiple branches. The workflow was renamed because it now includes validation over and above just checking for upstream fixes --- .github/workflows/upstream-commit-check.yml | 56 ------------------- .github/workflows/validate-kernel-commits.yml | 10 ++++ 2 files changed, 10 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/upstream-commit-check.yml create mode 100644 .github/workflows/validate-kernel-commits.yml diff --git a/.github/workflows/upstream-commit-check.yml b/.github/workflows/upstream-commit-check.yml deleted file mode 100644 index e95c4e904f8e4..0000000000000 --- a/.github/workflows/upstream-commit-check.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Check Kernel Commits for Upstream Fixes - -on: - pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: read - pull-requests: write - -jobs: - check-upstream-fixes: - runs-on: ubuntu-latest - - steps: - - name: Checkout PR branch - uses: actions/checkout@v4 - with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - fetch-depth: 0 - ref: ${{ github.head_ref }} - - - name: Checkout base branch - run: | - git remote add base_repo https://github.com/${{ github.repository }}.git - git fetch base_repo ${{ github.base_ref }}:${{ github.base_ref }} - - - name: Download check_kernel_commits.py - run: | - curl -sL \ - https://raw.githubusercontent.com/ctrliq/kernel-src-tree-tools/mainline/check_kernel_commits.py \ - -o check_kernel_commits.py - chmod +x check_kernel_commits.py - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Run upstream fixes check - id: checkkernel - run: | - python3 check_kernel_commits.py --repo . --pr_branch "${{ github.head_ref }}" --base_branch "${{ github.base_ref }}" --markdown | tee result.txt - # Save non-empty results for PR comment - if grep -q -v "All referenced commits exist upstream and have no Fixes: tags." result.txt; then - echo "has_findings=true" >> $GITHUB_OUTPUT - fi - - - name: Comment on PR if issues found - if: steps.checkkernel.outputs.has_findings == 'true' - env: - GH_TOKEN: ${{ github.token }} - run: | - gh pr comment ${{ github.event.pull_request.number }} \ - --body "$(cat result.txt)" \ - --repo ${{ github.repository }} diff --git a/.github/workflows/validate-kernel-commits.yml b/.github/workflows/validate-kernel-commits.yml new file mode 100644 index 0000000000000..c74434336e251 --- /dev/null +++ b/.github/workflows/validate-kernel-commits.yml @@ -0,0 +1,10 @@ +name: Validate Kernel Commits + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + check: + uses: ctrliq/kernel-src-tree/.github/workflows/validate-kernel-commits.yml@main + secrets: inherit