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:
135135
136136 steps :
137137 - uses : actions/checkout@v4.2.2
138+ with :
139+ fetch-depth : 0 # fetch full history
138140
139141 - name : Check if any src_c files changed
140142 id : check-changes
143+ continue-on-error : true
141144 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"
145151 echo "$CHANGED_FILES" | grep '^src_c/' || echo "skip=true" >> "$GITHUB_OUTPUT"
146152
147153 - name : Install cppcheck
You can’t perform that action at this time.
0 commit comments