|
20 | 20 | uses: actions/checkout@v3 |
21 | 21 | with: |
22 | 22 | fetch-depth: 0 |
| 23 | + |
23 | 24 |
|
24 | 25 | - |
25 | 26 | name: install dependencies |
|
32 | 33 | run: | |
33 | 34 | set -x |
34 | 35 | mkdir -p SCANCODE |
35 | | - |
| 36 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
36 | 37 | git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \ |
37 | 38 | | ( grep '.\(c\|cpp\|h\|hpp\|py\)$' || true ) |
38 | 39 | echo $? |
|
67 | 68 | - |
68 | 69 | name: include check |
69 | 70 | run: | |
| 71 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
70 | 72 | # checks mbed.h is not included in MbedOS files except in tests |
71 | 73 | ! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \ |
72 | 74 | ':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \ |
|
88 | 90 | - |
89 | 91 | name: UTF-8 Check |
90 | 92 | run: | |
| 93 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
91 | 94 | # Make sure we're not introducing any text which is not UTF-8 encoded |
92 | 95 | git diff origin/${GITHUB_BASE_REF} -U0 | ( grep -a '^+' || true ) | ( ! grep -axv '.*' ) |
93 | 96 | |
|
96 | 99 | name: astyle checks |
97 | 100 | run: | |
98 | 101 | set -x |
| 102 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
99 | 103 | git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \ |
100 | 104 | | ( grep '.*\.\(c\|cpp\|h\|hpp\)$' || true ) \ |
101 | 105 | | ( grep -v -f .codecheckignore || true ) \ |
@@ -192,6 +196,7 @@ jobs: |
192 | 196 | name: validate pins |
193 | 197 | run: | |
194 | 198 | set -x |
| 199 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
195 | 200 | git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \ |
196 | 201 | | ( grep '.*[\\|\/]PinNames.h$' || true ) \ |
197 | 202 | | while read file; do python ./hal/tests/pinvalidate/pinvalidate.py -vvvfp "${file}"; done |
@@ -245,6 +250,7 @@ jobs: |
245 | 250 | name: frozen tool check |
246 | 251 | run: | |
247 | 252 | set -x |
| 253 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
248 | 254 | git diff --name-only origin/${GITHUB_BASE_REF} \ |
249 | 255 | | egrep \ |
250 | 256 | -e "^tools/build_api*" \ |
|
0 commit comments