mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-06-24 02:01:03 -04:00
🐛 Add retry logic to gitea and act_runner downloads 🐛
gitea.com was returning 502 Bad Gateway from the build host, causing the act_runner download to fail immediately with no retry. Added --retry 5 --retry-delay 10 --retry-all-errors to both download curl calls so transient gateway errors don't abort the build. - rootfs/root/docker/setup/05-custom.sh: add retry flags to gitea and act_runner curl download calls rootfs/root/docker/setup/05-custom.sh
This commit is contained in:
@@ -61,7 +61,7 @@ GITEA_URL="https://github.com/go-gitea/gitea/releases/download/v${GITEA_VERSION}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Predefined actions
|
||||
echo "Downloading gitea from $GITEA_URL"
|
||||
if curl -4 -q -LSsf "$GITEA_URL" -o "/tmp/gitea.$$"; then
|
||||
if curl -4 -q -LSsf --retry 5 --retry-delay 10 --retry-all-errors "$GITEA_URL" -o "/tmp/gitea.$$"; then
|
||||
mv -f "/tmp/gitea.$$" "$GITEA_BIN_FILE"
|
||||
echo "gitea has been installed to: $GITEA_BIN_FILE"
|
||||
chmod +x "$GITEA_BIN_FILE"
|
||||
@@ -78,7 +78,7 @@ echo "Downloading act_runner from $ACT_URL"
|
||||
if [ -z "$ACT_URL" ]; then
|
||||
echo "Failed to resolve act_runner download URL" >&2
|
||||
exitCode=$((exitCode + 1))
|
||||
elif curl -q -LSsf "$ACT_URL" -o "/tmp/act_runner.$$"; then
|
||||
elif curl -q -LSsf --retry 5 --retry-delay 10 --retry-all-errors "$ACT_URL" -o "/tmp/act_runner.$$"; then
|
||||
mv -f "/tmp/act_runner.$$" "$ACT_BIN_FILE"
|
||||
echo "act_runner has been installed to: $ACT_BIN_FILE"
|
||||
chmod +x "$ACT_BIN_FILE"
|
||||
|
||||
Reference in New Issue
Block a user