CI/CD Workflows
CI/CD Workflows
The Unifi Dashboard utilizes GitHub Actions to automate software delivery and quality assurance. These workflows ensure that every update is validated for stability and that production-ready Docker images are consistently available for deployment.
Continuous Integration (CI)
The validation pipeline is triggered automatically on every Pull Request and Push to the main branch. This process ensures the codebase remains healthy and functional.
- Linting & Style: Validates the JavaScript (Node.js) and CSS against project standards to ensure code readability and maintainability.
- Dependency Audit: Scans for known vulnerabilities in the NPM dependency tree to maintain the security of the BFF (Backend-for-Frontend) server.
- Build Verification: Confirms that the Express server and frontend assets are correctly structured and ready for staging.
Continuous Deployment (CD)
The deployment pipeline handles the packaging and distribution of the application. When changes are merged into the main branch or a new release is tagged, the following automated steps occur:
1. Docker Image Generation
The workflow builds an optimized, production-ready Docker image based on the Alpine Linux distribution. This ensures the smallest possible footprint and a reduced attack surface.
- Multi-Platform Support: Images are typically built for
amd64andarm64, allowing the dashboard to run on standard servers as well as low-power devices like Raspberry Pi. - Non-Root Execution: The build process configures the container to run as a non-privileged user for enhanced security.
2. Registry Publishing
Once built, the images are automatically pushed to the GitHub Container Registry (GHCR).
- Tagging Strategy:
:latest— Always points to the most recent stable build from themainbranch.:vX.X.X— Specific versions pinned to GitHub releases for production stability.
Automated Health Checks
The Docker configuration includes integrated health checks. The CI/CD process validates that the container correctly reports its status to the Docker engine via the /api/sites proxy endpoint, ensuring that your monitoring dashboard is truly "up" and able to communicate with the UniFi API before it is marked as healthy.
Consuming Updates
To take advantage of the CI/CD pipeline in your local environment, you can simply pull the latest automated build:
docker pull ghcr.io/suddenelfilio/unifi-dashboard:latest
This ensures you are always running the most recent version validated by our automated testing suite.