scripts #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Copyright (c) 2024 Analog Devices, Inc. | |
# | |
# SPDX-License-Identifier: GPL-2.0 | |
## | |
name: checkpatch review | |
on: | |
push: | |
pull_request_target: | |
jobs: | |
pr_review: | |
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: Dependences python3-pip | |
shell: bash | |
run: | | |
sudo apt-get update && sudo apt-get install -y python3-pip | |
- name: Run checkpatch review | |
run: | | |
chmod +x ./entrypoint.sh | |
chmod +x ./review.sh | |
.github/scripts/entrypoint.sh |