Skip to content

Conversation

tpayet
Copy link
Member

@tpayet tpayet commented Jun 20, 2025

Summary

This PR updates the Docker publishing workflow to ensure Docker images are always available on Docker Hub by:

  • Publishing a latest tag on every commit to main
  • Publishing versioned tags (e.g., 0.5.0) only when the version changes

Problem

Currently, no Docker images exist on Docker Hub because the workflow only runs when the version changes. This means users can't use the Docker image until a new release is made.

Solution

Split the Docker publishing into two separate jobs:

  1. build-and-publish-docker-latest - Runs on EVERY main commit, always updates the latest tag
  2. build-and-publish-docker-versioned - Runs ONLY when version changes, creates version-specific tags

Changes Made

  • Updated .github/workflows/publish.yml to have separate Docker build jobs
  • Always publish getmeili/meilisearch-mcp:latest on main commits
  • Publish getmeili/meilisearch-mcp:X.Y.Z only on version changes
  • Minor README update to remove "(Recommended)" text

Result

After this PR is merged:

  • Every commit to main will update the latest Docker image
  • Users can immediately start using docker pull getmeili/meilisearch-mcp:latest
  • Version releases will create additional tagged images for stability

Note

The Docker Hub credentials (DOCKERHUB_USERNAME and DOCKERHUB_TOKEN) need to be configured in the repository secrets for the getmeili organization.

Summary by CodeRabbit

  • Chores
    • Improved workflow for Docker image publishing by separating jobs for latest and versioned tags, and simplifying version detection logic.
  • Documentation
    • Updated installation instructions in the README by removing the "(Recommended)" label from the "From Docker Hub" section.

- Build and push 'latest' tag on every commit to main
- Build and push versioned tag only when version changes
- Split Docker builds into two separate jobs for clarity
- This ensures Docker Hub always has the latest image available
Copy link
Contributor

coderabbitai bot commented Jun 20, 2025

Walkthrough

The workflow configuration for publishing has been refactored to extract and expose the current version from pyproject.toml, split Docker build-and-publish into separate jobs for latest and versioned tags, and simplify version checking logic. The README was updated to remove the "(Recommended)" label from the Docker Hub installation section.

Changes

File(s) Change Summary
.github/workflows/publish.yml Refactored workflow: extracts version in a new step, simplifies version check, splits Docker jobs into always-latest and conditional-versioned, updates outputs, and adjusts tagging logic.
README.md Removed "(Recommended)" from Docker Hub installation section header.

Poem

A bunny hops through YAML fields,
Tagging Docker with the yield,
"Latest" always, versioned when due,
The README’s label bid adieu.
With paws on code and nose for change,
This workflow’s hop is wide in range!
🐇


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
.github/workflows/publish.yml (5)

13-24: Improve version extraction robustness.
Using grep | cut on pyproject.toml is brittle if the formatting changes. Consider using a TOML parser (e.g., toml-cli or a small Python snippet) to reliably extract the version string.


28-32: Document dependency on commit history.
The version change check relies on git diff HEAD^ HEAD, which works due to fetch-depth: 2. Consider adding a comment or assertion to ensure the previous commit is always available to avoid silent failures.


66-93: DRY Docker setup steps.
The QEMU, Buildx, and Docker login steps are duplicated across two jobs. You could factor these into a reusable composite action or YAML anchor to simplify maintenance and reduce duplication.


84-93: Assess Docker Hub rate limits.
Since build-and-publish-docker-latest runs on every commit, you may hit Docker Hub rate limits. Consider adding a concurrency group or rate limiting mechanism to prevent excessive pushes.


18-18: Remove trailing whitespace.
Several blank lines contain unnecessary spaces, which can trigger YAML lint errors. Please remove trailing whitespace on these lines.

Also applies to: 24-24, 98-98, 101-101, 104-104, 107-107, 113-113

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8272e46 and 6984d51.

📒 Files selected for processing (2)
  • .github/workflows/publish.yml (3 hunks)
  • README.md (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/publish.yml

15-15: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


100-100: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/publish.yml

[error] 18-18: trailing spaces

(trailing-spaces)


[error] 24-24: trailing spaces

(trailing-spaces)


[error] 98-98: trailing spaces

(trailing-spaces)


[error] 101-101: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 107-107: trailing spaces

(trailing-spaces)


[error] 113-113: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test
🔇 Additional comments (2)
.github/workflows/publish.yml (1)

94-122: Validate versioned tag formatting.
The tags: ...:${{ needs.check-version.outputs.current_version }} step must receive a clean version string. Ensure there are no newline or whitespace artifacts in current_version by trimming or validating the output.

README.md (1)

144-144: Removed “(Recommended)” from Docker Hub section.
This neutral tone aligns with the new workflow, which now provides both latest and versioned tags without bias.

@tpayet tpayet merged commit 2821835 into main Jun 20, 2025
3 checks passed
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.

1 participant