diff options
author | Tim Newsome <tim@sifive.com> | 2023-04-13 08:38:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 08:38:59 -0700 |
commit | 4d274298b24f013f2211981b48500dd9bcffa98f (patch) | |
tree | a7558e5e08bf0a0dcc93f56d6c6d678b82ecebe1 | |
parent | 92dd9eed711277d17afffa2988b5ba27e1d6a832 (diff) | |
download | riscv-openocd-4d274298b24f013f2211981b48500dd9bcffa98f.zip riscv-openocd-4d274298b24f013f2211981b48500dd9bcffa98f.tar.gz riscv-openocd-4d274298b24f013f2211981b48500dd9bcffa98f.tar.bz2 |
workflow: Run checkpatch against diff with riscv (#822)
* workflow: Run checkpatch against pull request only
Instead of arbitrarily picking 20 changes.
Change-Id: I5ec488aa4faa0b06056aa91d0432cda1674967b7
Signed-off-by: Tim Newsome <tim@sifive.com>
* Display FETCH_HEAD in the log
Co-authored-by: Jan Matyas <50193733+JanMatCodasip@users.noreply.github.com>
Signed-off-by: Tim Newsome <tim@sifive.com>
---------
Signed-off-by: Tim Newsome <tim@sifive.com>
Co-authored-by: Jan Matyas <50193733+JanMatCodasip@users.noreply.github.com>
-rw-r--r-- | .github/workflows/checkpatch.yml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml index e2bf68f..a9ce549 100644 --- a/.github/workflows/checkpatch.yml +++ b/.github/workflows/checkpatch.yml @@ -10,16 +10,20 @@ jobs: BUILD_DIR: ../build steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: - fetch-depth: 50 + fetch-depth: 0 + - name: Checkout Base + run: | + git fetch origin ${{ github.event.pull_request.base.ref }} + echo "The current base for checkpatch is: $(git show FETCH_HEAD --oneline --raw)" - name: Install required packages (apt-get) run: | sudo apt-get update sudo apt-get install patchutils python3-ply python3-git - name: Run checkpatch run: | - git diff -U20 HEAD~40 \ + git diff --patch FETCH_HEAD \ | filterdiff \ -x "a/src/jtag/drivers/libjaylink/*" \ -x "a/tools/git2cl/*" \ |