mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
infra Actions: If no coding style error, no comment
and change action name
This commit is contained in:
parent
3d5006740c
commit
94f3d0dc11
3 changed files with 5 additions and 10 deletions
2
.github/workflows/actions.yml
vendored
2
.github/workflows/actions.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Continuous-integration
|
||||
name: Build Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
|
4
.github/workflows/actions_cpplint.yml
vendored
4
.github/workflows/actions_cpplint.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: PullRequest_Checker
|
||||
name: Check Commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -6,7 +6,7 @@ on:
|
|||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
coding-style:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
9
.github/workflows/cpp_lint_check.sh
vendored
9
.github/workflows/cpp_lint_check.sh
vendored
|
@ -37,7 +37,7 @@ cpplint --filter=-,\
|
|||
|
||||
PAYLOAD_CPPLINT=`cat cpp-report.txt`
|
||||
COMMENTS_URL=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.comments_url)
|
||||
|
||||
|
||||
echo $COMMENTS_URL
|
||||
echo "Cppcheck errors:"
|
||||
echo $PAYLOAD_CPPLINT
|
||||
|
@ -47,13 +47,8 @@ if [[ $PAYLOAD_CPPLINT == *"Total errors found: "* ]]; then
|
|||
OUTPUT+=$'\n```\n'
|
||||
OUTPUT+="$PAYLOAD_CPPLINT"
|
||||
OUTPUT+=$'\n```\n'
|
||||
|
||||
else
|
||||
OUTPUT+=$'\n**CODING STYLE CHECK**:\n'
|
||||
OUTPUT+=$'\n```\n'
|
||||
OUTPUT+="Perfect."
|
||||
OUTPUT+=$'\n```\n'
|
||||
fi
|
||||
|
||||
PAYLOAD=$(echo '{}' | jq --arg body "$OUTPUT" '.body = $body')
|
||||
|
||||
curl -s -S -H "Authorization: token $GITHUB_TOKEN" --header "Content-Type: application/vnd.github.VERSION.text+json" --data "$PAYLOAD" "$COMMENTS_URL"
|
||||
|
|
Loading…
Add table
Reference in a new issue