Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
6c698b8b
Unverified
Commit
6c698b8b
authored
Feb 20, 2026
by
Dmitry Tokarev
Committed by
GitHub
Feb 20, 2026
Browse files
fix: Docker push retries (#6456)
Signed-off-by:
Dmitry Tokarev
<
dtokarev@nvidia.com
>
parent
7a6283e9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
7 deletions
+40
-7
.github/actions/docker-tag-push/action.yml
.github/actions/docker-tag-push/action.yml
+9
-5
.github/actions/docker-tag-push/retry_push.sh
.github/actions/docker-tag-push/retry_push.sh
+29
-0
.github/actions/skopeo-copy/action.yml
.github/actions/skopeo-copy/action.yml
+1
-1
.github/workflows/build-test-distribute-flavor.yml
.github/workflows/build-test-distribute-flavor.yml
+1
-1
No files found.
.github/actions/docker-tag-push/action.yml
View file @
6c698b8b
...
...
@@ -51,9 +51,11 @@ runs:
ECR_HOSTNAME
:
${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_default_region }}.amazonaws.com
run
:
|
set -euo pipefail
if [[ ${CONDITIONAL_TAG} != '' ]]; then
docker tag ${LOCAL_IMAGE} ${ECR_HOSTNAME}/${CONDITIONAL_TAG}
docker push ${ECR_HOSTNAME}/${CONDITIONAL_TAG}
source "${{ github.action_path }}/retry_push.sh"
if [[ -n "${CONDITIONAL_TAG}" ]]; then
docker tag "${LOCAL_IMAGE}" "${ECR_HOSTNAME}/${CONDITIONAL_TAG}"
retry_push "${ECR_HOSTNAME}/${CONDITIONAL_TAG}"
fi
while IFS= read -r TAG; do
if [ -z "$TAG" ]; then
...
...
@@ -61,7 +63,7 @@ runs:
fi
echo "Tagging and pushing: ${ECR_HOSTNAME}/${TAG}"
docker tag "${LOCAL_IMAGE}" "${ECR_HOSTNAME}/${TAG}"
docker
push "${ECR_HOSTNAME}/${TAG}"
retry_
push "${ECR_HOSTNAME}/${TAG}"
done <<< "$PUSH_TAGS"
-
name
:
ACR Tag and Push
shell
:
bash
...
...
@@ -72,11 +74,13 @@ runs:
AZURE_ACR_HOSTNAME
:
${{ inputs.azure_acr_hostname }}
run
:
|
set -euo pipefail
source "${{ github.action_path }}/retry_push.sh"
while IFS= read -r TAG; do
if [ -z "$TAG" ]; then
continue
fi
echo "Tagging and pushing: ${AZURE_ACR_HOSTNAME}/${TAG}"
docker tag "${LOCAL_IMAGE}" "${AZURE_ACR_HOSTNAME}/${TAG}"
docker
push "${AZURE_ACR_HOSTNAME}/${TAG}"
retry_
push "${AZURE_ACR_HOSTNAME}/${TAG}"
done <<< "$PUSH_TAGS"
.github/actions/docker-tag-push/retry_push.sh
0 → 100644
View file @
6c698b8b
# Retry docker push with exponential backoff.
# Safe under `set -e`: the `if` conditional context prevents a failed
# `docker push` from triggering an immediate exit.
retry_push
()
{
local
image
=
"
$1
"
local
max_attempts
=
3
local
wait_seconds
=
10
local
attempt
=
1
while
true
;
do
if
docker push
"
$image
"
;
then
return
0
fi
echo
"Push failed for
$image
(attempt
${
attempt
}
/
${
max_attempts
}
)."
>
&2
if
((
attempt
>=
max_attempts
))
;
then
echo
"Push failed after
${
max_attempts
}
attempts:
$image
"
>
&2
return
1
fi
echo
"Retrying in
${
wait_seconds
}
s..."
sleep
"
$wait_seconds
"
attempt
=
$((
attempt
+
1
))
wait_seconds
=
$((
wait_seconds
*
2
))
if
((
wait_seconds
>
120
))
;
then
wait_seconds
=
120
fi
done
}
.github/actions/skopeo-copy/action.yml
View file @
6c698b8b
...
...
@@ -109,7 +109,7 @@ runs:
RETRY_DELAY=10
for attempt in $(seq 1 $MAX_RETRIES); do
echo "Attempt ${attempt}/${MAX_RETRIES}..."
if skopeo copy --all "${SOURCE_REF}" "${TARGET_REF}"; then
if skopeo copy --all
--retry-times 3
"${SOURCE_REF}" "${TARGET_REF}"; then
echo "target_image_ref=${{ inputs.target_registry }}/${TARGET_IMAGE}:${TARGET_TAG}" >> $GITHUB_OUTPUT
echo "✅ Image copied successfully"
exit 0
...
...
.github/workflows/build-test-distribute-flavor.yml
View file @
6c698b8b
...
...
@@ -90,7 +90,7 @@ on:
description
:
'
Timeout
in
minutes
for
the
copy
to
ACR
step'
required
:
false
type
:
number
default
:
5
default
:
10
secrets
:
AWS_DEFAULT_REGION
:
required
:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment