File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -342,12 +342,15 @@ jobs:
342
342
max-parallel : 4
343
343
matrix :
344
344
platform : [ubuntu-latest]
345
+ fetch-depth : [0, 1]
345
346
346
347
steps :
347
348
- name : Checkout to branch
348
349
uses : actions/checkout@v3
349
350
with :
351
+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
350
352
submodules : recursive
353
+ fetch-depth : ${{ matrix.fetch-depth }}
351
354
352
355
- name : Run changed-files with submodule
353
356
id : changed-files
Original file line number Diff line number Diff line change @@ -75,8 +75,11 @@ if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF ]]; then
75
75
# shellcheck disable=SC2086
76
76
git fetch $EXTRA_ARGS -u --progress --deepen=" $INPUT_FETCH_DEPTH " origin +refs/heads/" $SOURCE_BRANCH " :refs/remotes/origin/" $SOURCE_BRANCH " 1> /dev/null
77
77
fi
78
- # shellcheck disable=SC2086
79
- git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen=" $INPUT_FETCH_DEPTH " || true
78
+
79
+ if git submodule status & > /dev/null; then
80
+ # shellcheck disable=SC2086
81
+ git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen=" $INPUT_FETCH_DEPTH " || true
82
+ fi
80
83
fi
81
84
82
85
echo " ::debug::Getting HEAD SHA..."
@@ -194,6 +197,11 @@ else
194
197
git fetch $EXTRA_ARGS -u --progress --deepen=" $INPUT_FETCH_DEPTH " origin +refs/heads/" $TARGET_BRANCH " :refs/remotes/origin/" $TARGET_BRANCH " 1> /dev/null
195
198
git branch --track " $TARGET_BRANCH " origin/" $TARGET_BRANCH " 1> /dev/null || true
196
199
fi
200
+
201
+ if git submodule status & > /dev/null; then
202
+ # shellcheck disable=SC2086
203
+ git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen=" $INPUT_FETCH_DEPTH " || true
204
+ fi
197
205
fi
198
206
199
207
echo " ::debug::Getting HEAD SHA..."
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ function get_diff() {
93
93
fi
94
94
done < <( git submodule status --recursive | grep -v " ^-" | awk ' {print $2}' )
95
95
96
-
97
96
if [[ " $filter " == " D" ]]; then
98
97
while read -r sub; do
99
98
echo " $sub "
You can’t perform that action at this time.
0 commit comments