diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5426b7..1a536c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,15 +5,19 @@ jobs: name: checkpatch review runs-on: ubuntu-latest steps: + - name: 'Calculate PR commits + 1' + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} - name: Info run: | echo "Repository: $GITHUB_REPOSITORY" echo "Workspace: $GITHUB_WORKSPACE" pwd ls -la `pwd` + git log --oneline --graph - name: Run checkpatch review uses: webispy/checkpatch-action@master env: diff --git a/README.md b/README.md index 6df33be..2a1a90c 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,12 @@ jobs: name: checkpatch review runs-on: ubuntu-latest steps: + - name: 'Calculate PR commits + 1' + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} - name: Run checkpatch review uses: webispy/checkpatch-action@v9 ``` @@ -48,9 +51,12 @@ jobs: name: checkpatch review runs-on: ubuntu-latest steps: + - name: 'Calculate PR commits + 1' + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} - name: Run DPDK checkpatches.sh review uses: webispy/checkpatch-action@v9 env: @@ -71,9 +77,12 @@ jobs: contents: read pull-requests: read steps: + - name: 'Calculate PR commits + 1' + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} - name: Run checkpatch review uses: webispy/checkpatch-action@v9 env: