Skip to content

Commit ceb9539

Browse files
committed
workflow: Run checkpatch against pull request only
Instead of arbitrarily picking 20 changes. Change-Id: I5ec488aa4faa0b06056aa91d0432cda1674967b7 Signed-off-by: Tim Newsome <[email protected]>
1 parent 0c76e26 commit ceb9539

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/checkpatch.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ 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 }}
1619
- name: Install required packages (apt-get)
1720
run: |
1821
sudo apt-get update
1922
sudo apt-get install patchutils python3-ply python3-git
2023
- name: Run checkpatch
2124
run: |
22-
git diff -U20 HEAD~40 \
25+
git diff --patch FETCH_HEAD \
2326
| filterdiff \
2427
-x "a/src/jtag/drivers/libjaylink/*" \
2528
-x "a/tools/git2cl/*" \

0 commit comments

Comments
 (0)