ci: retry registry login
All checks were successful
Build TubeSync image / container (push) Successful in 11m1s
All checks were successful
Build TubeSync image / container (push) Successful in 11m1s
This commit is contained in:
@@ -61,7 +61,17 @@ jobs:
|
||||
echo "REGISTRY_TOKEN is not configured; image will build but publishing is skipped."
|
||||
exit 0
|
||||
fi
|
||||
echo "${REGISTRY_TOKEN}" | docker login git.wimby.cz --username wimby --password-stdin
|
||||
for attempt in 1 2 3; do
|
||||
if echo "${REGISTRY_TOKEN}" | docker login git.wimby.cz --username wimby --password-stdin; then
|
||||
break
|
||||
fi
|
||||
if [ "${attempt}" -eq 3 ]; then
|
||||
echo "Registry login failed after ${attempt} attempts."
|
||||
exit 1
|
||||
fi
|
||||
echo "Registry login failed (attempt ${attempt}); retrying..."
|
||||
sleep $((attempt * 5))
|
||||
done
|
||||
|
||||
- name: Build image
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user