-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.1 KB
/
cpp_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: cppcheck-action-test
on:
push:
branches: [main]
jobs:
# From: https://github.com/marketplace/actions/cppcheck-action
build:
name: cppcheck-test
runs-on: ubuntu-latest
steps:
# From: https://stackoverflow.com/a/76512688
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Git User
run: |
git config user.name "GitHub Action"
git config user.email "<EMAIL>"
- name: Update cpp_check Branch
run: |
git fetch origin
git checkout cpp_check
git reset --hard origin/main
git push -f origin cpp_check
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: cpp_check
- name: cppcheck
uses: deep5050/cppcheck-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN}}
- name: publish report
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'cpp_check'