@@ -199,12 +199,13 @@ jobs:
199199 if : success() || failure()
200200 outputs :
201201 base_branch : ${{ steps.base_branch.outputs.base_branch }}
202+ comparison_status : ${{ steps.comparison.outputs.comparison_status }}
202203
203204 steps :
204205 - name : Checkout kernel source
205206 uses : actions/checkout@v4
206207 with :
207- fetch-depth : 0
208+ fetch-depth : 100 # Enough depth for finding merge-base with parent branch
208209
209210 - name : Download current kselftest logs
210211 uses : actions/download-artifact@v4
@@ -359,15 +360,23 @@ jobs:
359360 if : success() || failure()
360361
361362 steps :
362- - name : Check if all stages passed
363+ - name : Check if tests passed and no regressions
363364 run : |
365+ # Skip PR if any test stage failed
364366 if [ "${{ needs.build.result }}" != "success" ] || \
365367 [ "${{ needs.boot.result }}" != "success" ] || \
366368 [ "${{ needs.test-kselftest.result }}" != "success" ]; then
367369 echo "One or more test stages failed, skipping PR creation"
368370 exit 1
369371 fi
370- echo "All test stages passed, proceeding with PR creation"
372+
373+ # Skip PR if regression was detected (but allow if comparison was skipped/unavailable)
374+ if [ "${{ needs.compare-results.outputs.comparison_status }}" = "failed" ]; then
375+ echo "Test regression detected, skipping PR creation"
376+ exit 1
377+ fi
378+
379+ echo "All test stages passed and no regressions detected, proceeding with PR creation"
371380
372381 - name : Checkout kernel source
373382 uses : actions/checkout@v4
0 commit comments