fix(ci): retry docker image build in server root path workflow

This commit is contained in:
copilot-swe-agent[bot] 2026-07-15 02:30:19 +00:00 • committed by GitHub
parent a720f7af5e
commit 43e20f5a3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,13 +36,26 @@ jobs:
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Build Docker image
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
with:
context: .
file: ./docker/Dockerfile.non_root
tags: litellm-test:${{ github.sha }}
load: true
push: false
run: |
retry() {
local attempt=1
local max_attempts=4
until "$@"; do
if [ "$attempt" -ge "$max_attempts" ]; then
echo "Command failed after $attempt attempts: $*"
return 1
fi
echo "Attempt $attempt failed: $*. Retrying in $((attempt * 15))s..."
sleep $((attempt * 15))
attempt=$((attempt + 1))
done
}
retry docker buildx build \
--file ./docker/Dockerfile.non_root \
--tag litellm-test:${{ github.sha }} \
--load \
.
- name: Start LiteLLM container with SERVER_ROOT_PATH
run: |