Skip to content

Commit

Permalink
CI: use prepared checkpatch.conf file only for GH actions
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ktanska committed Jul 2, 2024
1 parent b49cbdf commit 92341d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
File renamed without changes.
8 changes: 6 additions & 2 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 92341d6

Please sign in to comment.