Skip to content

Conversation

@devZenta
Copy link
Contributor

@devZenta devZenta commented Dec 28, 2025

This pull request updates the GitHub Actions workflow for building and publishing Docker images. The changes improve the workflow by supporting publishing on new tags, enhancing caching, and refining image tagging strategies.

Workflow triggers and structure:

  • The workflow now runs not only on pushes to main, but also on new version tags (v*) and pull requests targeting main.

Docker build and publishing enhancements:

  • Added Docker Buildx setup step to enable advanced build features and multi-platform builds.
  • Improved Docker image tagging: now includes tags for branches, pull requests, semantic versions, and SHA, instead of only latest.
  • Enabled GitHub Actions cache for Docker layers to speed up builds by adding cache-from and cache-to options.
  • The Docker image is only pushed to the registry when not running on a pull request, preventing unwanted publishing from PR builds. [1] [2]- Add Docker Buildx for multi-arch support
  • Enable GitHub Actions cache for faster builds
  • Add semver tagging for version releases (v*)
  • Build on PRs without pushing (validation only)
  • Add conditional push based on event type

🤖 Generated with Claude Code

- Add Docker Buildx for multi-arch support
- Enable GitHub Actions cache for faster builds
- Add semver tagging for version releases (v*)
- Build on PRs without pushing (validation only)
- Add conditional push based on event type

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@devZenta devZenta self-assigned this Dec 28, 2025
@devZenta devZenta added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 28, 2025
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Docker workflow by adding multi-architecture build support, build caching, and comprehensive tagging strategies including semver support for version releases.

Key Changes:

  • Enables Docker Buildx for multi-platform builds with GitHub Actions cache integration for faster build times
  • Implements conditional build behavior: validates Docker builds on PRs without pushing, pushes only on main branch commits and version tags
  • Adds semver-based tagging (full version and major.minor) alongside branch, PR, and SHA-based tags

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

type=raw,value=latest
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semver tagging configuration is missing the type=semver,pattern={{major}} pattern. Without this, major version tags (e.g., v1) won't be created, which is a common practice for allowing users to pin to major versions. Consider adding this pattern to provide more flexibility for consumers of the image.

Suggested change
type=semver,pattern={{version}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}

Copilot uses AI. Check for mistakes.
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the type=raw,value=latest tag means that images pushed from the main branch will no longer be tagged as latest. This could break workflows or documentation that relies on pulling the latest tag. Consider adding back the latest tag for main branch pushes using:

type=raw,value=latest,enable={{is_default_branch}}

This ensures the latest tag is only applied to the default branch (main).

Suggested change
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}

Copilot uses AI. Check for mistakes.
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SHA tag format uses an empty prefix (prefix=), which will result in tags that are just the raw SHA (e.g., abc123 instead of sha-abc123). This could be confusing as it's unclear what the tag represents. Consider using the default sha- prefix by removing the prefix= parameter, or use a more descriptive prefix to make it clear these are commit SHA tags.

Suggested change
type=sha,prefix=
type=sha

Copilot uses AI. Check for mistakes.
@devZenta devZenta merged commit 51fab04 into main Dec 28, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants