Try building Linux images again with aggressiv fetch retries
This commit is contained in:
parent
d442ab7a0d
commit
df8e5bf96f
2 changed files with 14 additions and 2 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -86,7 +86,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [win64]
|
||||
target: [win64,linux64]
|
||||
variant: [gpl,lgpl,gpl 4.4,lgpl 4.4,gpl-shared,lgpl-shared,gpl-shared 4.4,lgpl-shared 4.4]
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
|
@ -5,6 +5,18 @@ REF="$2"
|
|||
DEST="$3"
|
||||
git init "$DEST"
|
||||
git -C "$DEST" remote add origin "$REPO"
|
||||
git -C "$DEST" fetch --depth=1 origin "$REF"
|
||||
|
||||
RETRY_COUNTER=0
|
||||
MAX_RETRY=15
|
||||
while [[ $RETRY_COUNTER -lt $MAX_RETRY ]]; do
|
||||
timeout 120 git -C "$DEST" fetch --depth=1 origin "$REF" && break || sleep 10
|
||||
RETRY_COUNTER=$(( $RETRY_COUNTER + 1 ))
|
||||
echo "Retry $RETRY_COUNTER..."
|
||||
done
|
||||
if [[ $RETRY_COUNTER -ge $MAX_RETRY ]]; then
|
||||
echo "Max retry count exceeded."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git -C "$DEST" config advice.detachedHead false
|
||||
git -C "$DEST" checkout FETCH_HEAD
|
||||
|
|
Loading…
Reference in a new issue