This repository contains CI/CD configuration files for projects using PNPM, Node.js, and publishing Docker images to a private registry.
pnpm/
├── .gitlab-ci.yml # GitLab CI pipeline
├── ci.yaml # GitHub Actions pipeline
└── README.md # This file
Triggered on:
- all branches (
push) - all merge requests (GitLab) or pull requests (GitHub)
- all version tags
Runs the following steps:
- Read
.nvmrcfor Node.js version - Install
pnpm@10 - Lint code (
pnpm lint) - Format code (
pnpm format) - Run unit tests (
pnpm test:unit) - Run end-to-end tests (
pnpm test:e2e)
Triggered only when a tag matching v* is pushed (e.g. v1.0.0)
Runs the following steps:
- Read
.nvmrc - Authenticate with private Docker registry
- Build Docker image using
docker buildx - Push image with:
- Tag based on Git tag
- Labels
org.opencontainers.image.versionandsource
Path: pnpm/ci.yaml
Should be moved to: .github/workflows/ci.yml
PRIVATE_REGISTRY_URLPRIVATE_REGISTRY_USERNAMEPRIVATE_REGISTRY_PASSWORD
Path: pnpm/.gitlab-ci.yml
Should be moved to: .gitlab-ci.yml
CI_REGISTRYCI_REGISTRY_USERCI_REGISTRY_PASSWORD
- A
.nvmrcfile with the Node.js version (e.g.20.11.1) - A
Dockerfileat the project root for building the Docker image
20.11.1
"scripts": {
"lint": "eslint .",
"format": "prettier --check .",
"test:unit": "vitest run",
"test:e2e": "playwright test"
}| Feature | GitHub Actions | GitLab CI |
|---|---|---|
| Lint / Format / Tests | ✅ | ✅ |
| Build & Push Docker (tag) | ✅ | ✅ |
| Auto-read Node version (.nvmrc) | ✅ | ✅ |
| PNPM with corepack | ✅ | ✅ |
MIT © Guillaume CATEL