Skip to content

Commit b587496

Browse files
timsifiveJanMatCodasip
authored andcommitted
workflow: Run checkpatch against diff with riscv (riscv-collab#822)
* workflow: Run checkpatch against pull request only Instead of arbitrarily picking 20 changes. Change-Id: I5ec488aa4faa0b06056aa91d0432cda1674967b7 Signed-off-by: Tim Newsome <[email protected]> * Display FETCH_HEAD in the log Co-authored-by: Jan Matyas <[email protected]> Signed-off-by: Tim Newsome <[email protected]> --------- Signed-off-by: Tim Newsome <[email protected]> Co-authored-by: Jan Matyas <[email protected]>
1 parent 149f51b commit b587496

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/checkpatch.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ jobs:
1010
BUILD_DIR: ../build
1111
steps:
1212
- name: Checkout Code
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414
with:
15-
fetch-depth: 50
15+
fetch-depth: 0
16+
- name: Checkout Base
17+
run: |
18+
git fetch origin ${{ github.event.pull_request.base.ref }}
19+
echo "The current base for checkpatch is: $(git show FETCH_HEAD --oneline --raw)"
1620
- name: Install required packages (apt-get)
1721
run: |
1822
sudo apt-get update
1923
sudo apt-get install patchutils
2024
- name: Run checkpatch
2125
run: |
22-
git diff -U20 HEAD~40 \
26+
git diff --patch FETCH_HEAD \
2327
| filterdiff \
2428
-x "a/src/jtag/drivers/libjaylink/*" \
2529
-x "a/tools/git2cl/*" \

0 commit comments

Comments
 (0)