Retry docker build in Forgejo workflow for transient pulls
All checks were successful
build-local-image / build (push) Successful in 4m58s

This commit is contained in:
centra 2026-02-14 15:54:19 +09:00
parent 559ade405e
commit e4d95b660d
Signed by: centra
GPG key ID: 0C09689D20B25ACA

View file

@ -11,7 +11,17 @@ jobs:
runs-on: nix-host
steps:
- name: Build local image on runner host
run: docker build --pull -t lightscale-admin:local "https://git.centraworks.net/centra/lightscale-admin.git#${GITHUB_SHA}"
run: |
set -euo pipefail
for i in 1 2 3; do
if docker build --pull -t lightscale-admin:local "https://git.centraworks.net/centra/lightscale-admin.git#${GITHUB_SHA}"; then
exit 0
fi
if [ "$i" -lt 3 ]; then
sleep 10
fi
done
exit 1
- name: Show built image
run: docker image ls lightscale-admin:local