Skip to content

Conversation

@nullable-eth
Copy link
Owner

🐳 Fix Docker Image Tags to Match GitHub Release Tags

Problem

The GitHub release flow was working correctly, but GHCR package tags were not matching the actual release tags on the repository.

Expected: Release tag v1.0.14 → GHCR tag 1.0.14
Actual: Release tag v1.0.14 → GHCR tag 1.0.123 (commit count based)

Root Cause

The docker-publish.yml workflow had conflicting tagging strategies:

  1. Custom version generation logic that created tags based on commit count (1.0.COMMIT_COUNT)
  2. docker/metadata-action that should handle Git tags properly

The custom logic was overriding proper Git tag handling, causing the mismatch.

Solution

  • Removed conflicting custom version generation logic
  • Simplified workflow to rely on docker/metadata-action for proper Git tag handling
  • Updated tagging strategy to create proper semantic version tags:
    • v1.0.141.0.14, 1.0, 1, latest

Impact

  • 🎯 GHCR package tags now match GitHub release tags exactly
  • 🧹 Cleaner, more maintainable workflow
  • 📦 Proper semantic versioning for Docker images
  • 🔄 No breaking changes to existing functionality

Testing

  • Workflow syntax validated
  • Tagging logic verified against docker/metadata-action documentation
  • Next release will validate the fix end-to-end

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Closes: #[issue-number] (if you have a related issue)

@nullable-eth nullable-eth merged commit 9100316 into main Jul 3, 2025
1 check passed
@nullable-eth nullable-eth deleted the fix-ghcr-tags-match-release branch July 3, 2025 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants