WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@himanshusinghs
Copy link
Collaborator

@himanshusinghs himanshusinghs commented Dec 8, 2025

Proposed changes

Our publish job which publishes the artifacts to MCP registry depends on the docker image being available already but its not when we publish. The docker images are published on a scheduled basis or on manual dispatch.

This PR changes the publish workflow such that we publish to docker as soon as we have the npm package listed in the registry and then proceed ahead with MCP registry publish.

An example failure - https://github.com/mongodb-js/mongodb-mcp-server/actions/runs/19944234451/job/57189691853

Checklist

@coveralls
Copy link
Collaborator

coveralls commented Dec 8, 2025

Pull Request Test Coverage Report for Build 20029672966

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 80.311%

Totals Coverage Status
Change from base Build 19944234497: 0.3%
Covered Lines: 6656
Relevant Lines: 8204

💛 - Coveralls

@himanshusinghs himanshusinghs marked this pull request as ready for review December 8, 2025 13:16
@himanshusinghs himanshusinghs requested a review from a team as a code owner December 8, 2025 13:16
Copilot AI review requested due to automatic review settings December 8, 2025 13:16
Copy link
Contributor

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 fixes the publish workflow to ensure Docker images are available before publishing to the MCP registry. Previously, the MCP registry publish job depended on Docker images that were only built on a schedule or manual dispatch, causing failures during releases.

Key changes:

  • Refactored Docker build/push logic into a reusable workflow action
  • Added npm package availability check before Docker publishing in the main publish workflow
  • Updated dependency chain: publish → wait for npm → docker-push → mcp-publish

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/publish.yml Added npm package availability polling, docker-push job dependency, and renamed mcp-publish job with correct dependencies
.github/workflows/docker.yml Refactored to use new reusable docker-publish action and improved failure handling job
.github/actions/docker-publish.yml New reusable workflow containing extracted Docker build and push logic

@@ -0,0 +1,50 @@
---
name: Build and Push Docker Image
Copy link
Collaborator

Choose a reason for hiding this comment

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

q: should this be a workflow or an action? tbh not sure what pros and cons of each are

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They both could be used for reusability. I used the workflow here only because they have better support for credentials masking. I don't have a strong feeling about it though as I only recently found about this and was curious to see this in action.

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.

4 participants