File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change 11name : Check code formatting with astyle
2-
32on :
43 push :
4+ branches :
5+ - main
6+ paths-ignore :
7+ - ' *'
8+ - ' **.md'
9+ - ' **.txt'
510 pull_request :
11+ paths-ignore :
12+ - ' *'
13+ - ' **.md'
14+ - ' **.txt'
615 # Allows you to run this workflow manually from the Actions tab
716 workflow_dispatch :
817jobs :
9- check :
10- name : Check for astyle errors
18+ astyle_check :
1119 runs-on : ubuntu-latest
12-
20+ name : Check for astyle errors
1321 steps :
14- - run : sudo apt install astyle
15- - uses : actions/checkout@v3
16- - run : astyle --project=extras/.astylerc --recursive '*.c*' '*.h'
17- # If anything changed, this will fail and show the needed changes
18- - run : git diff --exit-code
22+ # First of all, clone the repo using the checkout action.
23+ - name : Checkout
24+ uses : actions/checkout@main
25+
26+ - name : Astyle check
27+ id : Astyle
28+ uses : stm32duino/actions/astyle-check@main
29+
30+ # Use the output from the `Astyle` step
31+ - name : Astyle Errors
32+ if : failure()
33+ run : |
34+ cat ${{ steps.Astyle.outputs.astyle-result }}
35+ exit 1
You can’t perform that action at this time.
0 commit comments