Retry docker build in Forgejo workflow for transient pulls
All checks were successful
build-local-image / build (push) Successful in 4m58s
All checks were successful
build-local-image / build (push) Successful in 4m58s
This commit is contained in:
parent
559ade405e
commit
e4d95b660d
1 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue