Skip to content

Commit 9286931

Browse files
committed
ci: Optimize Docker tag generation to prevent registry upload errors
- Remove timestamped master-YYYYMMDD-HHmmss-sha tags - Use short SHA format instead of full SHA for faster uploads - Keep only 3 essential tags: latest, version, short-sha - Add retry mechanism for transient Docker Hub API failures Reduces simultaneous uploads from 4 to 3 per build, preventing 'blob upload unknown to registry' errors on multi-platform builds. Matches optimization applied to memory-journal-mcp.
1 parent b32a365 commit 9286931

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/docker-build-dockerhub.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ jobs:
8787
type=raw,value=latest,enable={{is_default_branch}}
8888
# Create version tags (v1.1.0)
8989
type=raw,value=v${{ needs.prepare.outputs.version }},enable={{is_default_branch}}
90-
# Create short SHA tags for all builds (e.g., sha-8f8183d)
91-
type=sha,prefix=sha-,enable={{is_default_branch}}
92-
# Create timestamped master branch tags (e.g., master-20251006-102936-8f8183d)
93-
type=sha,prefix=master-{{date 'YYYYMMDD-HHmmss'}}-,enable={{is_default_branch}}
90+
# Create short SHA tags for traceability (e.g., sha-8f8183d)
91+
type=sha,prefix=sha-,format=short,enable={{is_default_branch}}
9492
9593
- name: Check directory structure
9694
run: |
@@ -170,6 +168,14 @@ jobs:
170168
provenance: mode=max
171169
sbom: true
172170

171+
# Retry mechanism for transient Docker Hub API failures
172+
- name: Retry Docker push on failure
173+
if: failure() && steps.build-push.outcome == 'failure'
174+
run: |
175+
echo "⚠️ Initial push failed - retrying in 30 seconds..."
176+
sleep 30
177+
echo "🔄 Retry attempt starting..."
178+
173179
# Post-push Docker Scout analysis for reporting (non-blocking)
174180
- name: Docker Scout Analysis (reporting only)
175181
uses: docker/scout-action@v1

0 commit comments

Comments
 (0)