File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -135,13 +135,19 @@ jobs:
135
135
136
136
steps :
137
137
- uses : actions/checkout@v4.2.2
138
+ with :
139
+ fetch-depth : 0 # fetch full history
138
140
139
141
- name : Check if any src_c files changed
140
142
id : check-changes
143
+ continue-on-error : true
141
144
run : |
142
- git fetch origin ${{ github.base_ref }} --depth=1 || true
143
- git checkout ${{ github.base_ref }}
144
- CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
145
+ if [[ "${{ github.event_name }}" == "pull_request" ]]; then
146
+ CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
147
+ else
148
+ CHANGED_FILES=$(git diff --name-only HEAD^1...HEAD)
149
+ fi
150
+ echo "Changed files: $CHANGED_FILES"
145
151
echo "$CHANGED_FILES" | grep '^src_c/' || echo "skip=true" >> "$GITHUB_OUTPUT"
146
152
147
153
- name : Install cppcheck
You can’t perform that action at this time.
0 commit comments