File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919"instance_parameters" :
2020{
2121 "ImageId" : " ami-01fc4c78425e127e6" ,
22- "InstanceType" : " t4g.large " ,
22+ "InstanceType" : " m8g.xlarge " ,
2323 "KeyName" : " actions_key_arm" ,
2424 "SecurityGroupIds" : [" sg-0fcbe0c6d6faa0117" ],
2525 "IamInstanceProfile" : {
Original file line number Diff line number Diff line change 2323"instance_parameters" :
2424{
2525 "ImageId" : " ami-01fc4c78425e127e6" ,
26- "InstanceType" : " t4g.large " ,
26+ "InstanceType" : " m8g.xlarge " ,
2727 "KeyName" : " actions_key_arm" ,
2828 "SecurityGroupIds" : [" sg-0fcbe0c6d6faa0117" ],
2929 "IamInstanceProfile" : {
Original file line number Diff line number Diff line change @@ -53,16 +53,22 @@ echo "$DOCKERHUB_TOKEN" | docker login -u awiciroh --password-stdin >> "$LOG_FIL
5353}
5454log " ✓ Docker login successful"
5555
56- # Push function
56+ # Push function with retry logic
5757push_image () {
58- local image=$1 tag=$2
59- log " Pushing $image :$tag and latest-arm64..."
60-
61- docker tag " awiciroh/$image :latest-arm64" " awiciroh/$image :$tag " >> " $LOG_FILE " 2>&1
62- docker push " awiciroh/$image :$tag " >> " $LOG_FILE " 2>&1
63- docker push " awiciroh/$image :latest-arm64" >> " $LOG_FILE " 2>&1
64-
65- log " ✓ Successfully pushed $image :$tag "
58+ local image=$1 tag=$2 max_retries=3
59+ for i in $( seq 1 $max_retries ) ; do
60+ log " Pushing $image :$tag (attempt $i /$max_retries )..."
61+ if docker tag " awiciroh/$image :latest-arm64" " awiciroh/$image :$tag " && \
62+ docker push " awiciroh/$image :$tag " && \
63+ docker push " awiciroh/$image :latest-arm64" ; then
64+ log " ✓ Successfully pushed $image :$tag "
65+ return 0
66+ fi
67+ log " Attempt $i failed, retrying in 10s..."
68+ sleep 10
69+ done
70+ log " ✗ Failed to push $image :$tag after $max_retries attempts"
71+ return 1
6672}
6773
6874# Push all queued images
You can’t perform that action at this time.
0 commit comments