Check pull request with cppcheck and post result to review comments.
inputs:
github_token:
description: "action github token"required: falserepository:
description: "owner and repository name"required: truepull_request_id:
description: "pull request id"required: trueallow_approve:
description: "allow submit approve review"required: truedefault: trueenable_checks:
description: "checks to enable"required: truedefault: "all"install_cppcheck:
description: "install cppcheck by apt"required: falsedefault: truecomment_result:
description: "submit the result in a comment"required: falsedefault: trueuse pull_request_target event
pull_request_target vs pull_request
name: cppcheckon:
pull_request_target:
types: [opened, synchronize]jobs:
cppchceck:
name: cppcheckruns-on: ubuntu-lateststeps:
- uses: actions/checkout@v2with:
ref: ${{ github.event.pull_request.head.sha }}persist-credentials: false
- uses: linuxdeepin/action-cppcheck@mainwith:
github_token: ${{ secrets.GITHUB_TOKEN }}repository: ${{ github.repository }}pull_request_id: ${{ github.event.pull_request.number }}