Skip to content

Conversation

@nullable-eth
Copy link
Owner

🐳 Fix Docker Package Tags to Match GitHub Release Tags

Problem

GHCR package tags were not matching GitHub release tags, causing version confusion for users.

Expected: Release tag v1.1.1 β†’ GHCR tag 1.1.1
Actual: Release tag v1.1.1 β†’ GHCR tag 1.0.14 (unrelated version)

Root Cause

The Docker workflow was triggered by both main branch pushes and Git tag pushes, creating conflicting tagging strategies:

  • Main branch pushes β†’ Custom versioning (1.0.X based on commit count)
  • Git tag pushes β†’ Proper semantic versioning (1.1.1 from v1.1.1)

Since main pushes happened before release tags were created, the wrong versions were being published to GHCR.

Solution

  • βœ… Removed main branch trigger - Docker workflow now only runs on Git tag pushes
  • βœ… Split workflow into focused jobs:
    • build-release: Runs on Git tags (v*) β†’ Creates proper semantic versions
    • build-pr: Runs on PRs β†’ Build-only for testing
  • βœ… Removed redundant dev builds since every merge creates a release
  • βœ… Simplified workflow with clear job separation

Result

Now when you create release v1.1.1:

  • 🎯 GHCR gets: 1.1.1, 1.1, 1, latest
  • 🎯 GitHub release: v1.1.1
  • βœ… Perfect match!

Impact

  • πŸ”„ GHCR package tags now exactly match GitHub release tags
  • 🧹 Cleaner workflow with no redundant builds
  • πŸ“¦ Proper semantic versioning for Docker images
  • 🚫 No more version conflicts or confusion

Testing

  • Workflow syntax validated
  • Job conditions verified
  • Tagging strategy confirmed with docker/metadata-action docs
  • 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)

Fixes: Docker package versioning mismatch with GitHub releases

@nullable-eth nullable-eth merged commit c564c0d into main Jul 3, 2025
2 checks passed
@nullable-eth nullable-eth deleted the fix-actually-fix-ghcr-tag branch July 3, 2025 01:20
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