From 92341d63f50837a4772d9d247b0d42bde6e5dd40 Mon Sep 17 00:00:00 2001 From: Kinga Stefaniuk Date: Mon, 1 Jul 2024 16:31:32 +0200 Subject: [PATCH] CI: use prepared checkpatch.conf file only for GH actions Configuration file .checkpatch.conf is working properly only with GH actions, because flags from GH plugin are used there. This file shall not be placed in main repo directory, because it causes errors while using checkpatch from Linux. Add step to review.yml to copy this file before checkpatch action is started. Signed-off-by: Kinga Stefaniuk --- .checkpatch.conf => .github/tools/.checkpatch.conf | 0 .github/workflows/review.yml | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) rename .checkpatch.conf => .github/tools/.checkpatch.conf (100%) diff --git a/.checkpatch.conf b/.github/tools/.checkpatch.conf similarity index 100% rename from .checkpatch.conf rename to .github/tools/.checkpatch.conf diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 57f5d238..cce34e92 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -31,11 +31,15 @@ jobs: runs-on: ubuntu-latest name: checkpatch review steps: - - name: 'Calculate PR commits + 1' - run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: ${{ env.PR_FETCH_DEPTH }} + - name: 'Calculate PR commits + 1' + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV + - name: 'Move prepared .checkpatch.conf file to main directory' + run: mv .github/tools/.checkpatch.conf . + - name: Check + run: ls -la - name: Run checkpatch review uses: webispy/checkpatch-action@v9