Skip to content

Conversation

@parth5012
Copy link

📌 Description

This PR implements the Continuous Integration (CI) pipeline requested in #41 to automate the containerization of the MicroForge application.

What does this PR do?

  • Added Root Dockerfile: Created a comprehensive Multi-Stage Dockerfile that defines build targets for all 5 microservices (auth, frontend, login, metadata, notification).
  • GitHub Actions Workflow: Implemented .github/workflows/docker-publish.yml using a Matrix Strategy. This allows all 5 services to be built and pushed in parallel jobs.
  • Dynamic Tagging: Configured the pipeline to tag images with semantic versions (e.g., v1.0.0), latest, and the Git commit SHA for traceability.

Why is this change needed?
Previously, builds and pushes were manual. This automation ensures that every change to the master branch is automatically verified, built, and deployed to the Docker Registry without human intervention.


🔗 Related Issue

Fixes #41


🛠️ Type of Change

Please mark the relevant option:

  • Documentation update
  • Bug fix
  • New feature
  • Refactor
  • Configuration / DevOps change
  • Other (please explain)

🧪 How Was This Tested?

Describe how you verified your changes:

  • Docker Compose runs successfully
  • Frontend loads correctly
  • Service builds without errors
  • Documentation renders correctly
  • Manual testing (Verified workflow execution on a fork/feature branch)

📸 Screenshots (if applicable)

No UI changes. Workflow logs confirm successful parallel builds:
image


✅ Checklist

Please confirm the following:

  • My code follows the project structure
  • I tested my changes locally (and via CI triggers)
  • I linked the relevant issue
  • I kept this PR focused and minimal
  • I am open to feedback and changes

📝 Additional Notes

⚠️ Critical Setup for Maintainers:

For this pipeline to function correctly after merging, the project admin must add the following Repository Secrets in Settings > Secrets and variables > Actions:

  1. DOCKER_USERNAME: The Docker Hub username.
  2. DOCKER_PASSWORD: The Docker Hub password (or Access Token).

@github-actions
Copy link

Hi @parth5012 Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

Copy link
Owner

@Manoj-14 Manoj-14 left a comment

Choose a reason for hiding this comment

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

Here are some changes required

  • I don't want push trigger on stage branch.
  • Add manual trigger
  • Accept input for version

@parth5012
Copy link
Author

parth5012 commented Jan 11, 2026

Thanks for the review! I have updated the workflow configuration to address your feedback:

  1. Triggers: Removed the push trigger for the stage branch so it only auto-deploys on master.
  2. Manual Trigger: Added workflow_dispatch to allow manual execution of the pipeline.
  3. Version Input: Added a version input field to the manual trigger, allowing custom version tags (e.g., v1.2.0) during manual builds.

The changes are pushed and ready for review.
Screenshot 2026-01-11 080937

@parth5012 parth5012 requested a review from Manoj-14 January 11, 2026 02:49
@Manoj-14 Manoj-14 deleted the branch Manoj-14:stage January 11, 2026 12:04
@Manoj-14 Manoj-14 closed this Jan 11, 2026
@Manoj-14 Manoj-14 reopened this Jan 11, 2026
@parth5012
Copy link
Author

@Manoj-14 I have implemented the version override logic:

Service Selection: Added a service_target dropdown so we can trigger a build for a specific service (or all of them).

Dynamic Versioning: Added a logic step that uses the input.version if provided; otherwise, it falls back to the default matrix version.

This allows us to manually release a specific version for any service (e.g., selecting auth-service and entering v1.5.0) without editing the YAML file.

@parth5012
Copy link
Author

@Manoj-14 I have updated the workflow to remove the hardcoded versions from the matrix as requested.

Summary of Changes:

Simplified Matrix: The matrix strategy now only lists the service names (e.g., auth-service).

Dynamic Tagging:

    Automated Pushes: Will automatically apply latest and sha tags.

    Manual Trigger: The specific version tag (e.g., v1.2.0) is applied only when provided via the workflow_dispatch input.

This ensures we don't need to modify the YAML file just to bump a version number. The changes are pushed and ready for review.
image
image

@parth5012 parth5012 requested a review from Manoj-14 January 13, 2026 06:19
@Manoj-14 Manoj-14 merged commit dd9a646 into Manoj-14:stage Jan 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants