Skip to content

feat: Reusable publish-npm and docker-build workflows (Phase 3)#2

Merged
LucasSantana-Dev merged 1 commit intomainfrom
feat/phase3-publish-workflows
Mar 8, 2026
Merged

feat: Reusable publish-npm and docker-build workflows (Phase 3)#2
LucasSantana-Dev merged 1 commit intomainfrom
feat/phase3-publish-workflows

Conversation

@LucasSantana-Dev
Copy link
Member

@LucasSantana-Dev LucasSantana-Dev commented Mar 8, 2026

Summary

  • reusable-publish-npm.yml — Validate (lint, typecheck, build, test, audit) → Publish (npm with provenance) → GitHub Release
  • reusable-docker-build.yml — Docker Buildx with GHCR login, multi-platform support, tag strategies (version/git/custom), GHA caching

Inputs

publish-npm

Input Default Description
node-version 22 Node.js version
build-command npm run build Build command
test-command npm test Test command (empty to skip)
lint-command Lint command (empty to skip)
typecheck-command Type check command (empty to skip)
provenance true npm provenance attestation
dry-run false Dry run mode
create-release true Create GitHub Release
NPM_TOKEN required npm auth token

docker-build

Input Default Description
image-name required Image name (e.g. forgespace/mcp-gateway)
dockerfile Dockerfile Dockerfile path
platforms linux/amd64 Target platforms
push false Push to registry
tag-strategy git version, git, or custom
test-command Post-build test command

Applicable repos

  • publish-npm: core, siza-gen, ui-mcp, brand-guide, branding-mcp (5 npm packages)
  • docker-build: mcp-gateway, ui-mcp (2 Docker images)

Test plan

  • Validate YAML syntax
  • Pilot with branding-mcp (simplest npm package)
  • Roll out to remaining npm repos
  • Pilot docker-build with mcp-gateway

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added a reusable Docker build workflow enabling automated image creation, testing, and multi-architecture registry publishing.
    • Added a reusable npm package publishing workflow with automated validation, testing, provenance verification, and release management.

Reusable workflows for npm publishing (validate → publish → release)
and Docker multi-platform builds (buildx → GHCR → test).
@LucasSantana-Dev LucasSantana-Dev merged commit 01339c2 into main Mar 8, 2026
1 check passed
@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1d76ace3-4cfa-4e30-8d2f-bd96e0d15b8d

📥 Commits

Reviewing files that changed from the base of the PR and between 94ea8c4 and 13dc579.

📒 Files selected for processing (2)
  • .github/workflows/reusable-docker-build.yml
  • .github/workflows/reusable-publish-npm.yml

📝 Walkthrough

Walkthrough

Two new reusable GitHub Actions workflows are introduced: one for building and optionally pushing Docker images with multi-platform support and flexible tag generation strategies; another for validating, publishing npm packages, and creating GitHub releases with configurable options for provenance, dry-runs, and release generation.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/reusable-docker-build.yml, .github/workflows/reusable-publish-npm.yml
Adds two new reusable workflows: docker-build for multi-arch image building with Buildx/QEMU, Docker Hub/GHCR authentication, and configurable tag strategies (version-based, git-based, custom); publish-npm for npm package validation (lint, typecheck, tests, audit), publishing with provenance support, and conditional GitHub release creation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hop hop! The workflows multiply with cheer,
Docker images build from far and near,
npm packages published without fear,
GitHub releases dance throughout the year,
Automation's magic is finally here! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/phase3-publish-workflows

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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