Repository navigation
v0.1.0
Release Notes - Klever Labs Workflows v0.1.0
🎉 Initial Release
This is the first official release of the Klever Labs Workflows repository, providing reusable GitHub Actions workflows and automation templates for the organization.
📦 What's Included
Reusable Workflows
Node.js CI Workflows
node-ci.yml- Full-featured Node.js CI with separate jobs for linting, type checking, and testingnode-ci-simple.yml- Simplified single-job Node.js CI for faster execution- Both workflows support pnpm, npm, and yarn package managers
Docker Build Workflow
docker-build.yml- Multi-registry Docker build and push workflow- Supports GCR, GitHub Container Registry (GHCR), and Docker Hub
- Multi-language support (Go, Node.js, Python)
- Build-time secrets and custom build arguments
- Automatic language version detection
- Container image scanning with Trivy
- Multi-platform builds (AMD64, ARM64)
Internal Workflows
-
ci.yml- Comprehensive CI for this repository- YAML validation with yamllint
- Workflow validation with actionlint
- Shell script checking with shellcheck
- Markdown linting
- Security scanning with Trivy
-
release.yml- Automated release creation- Triggers after successful CI completion
- Smart version bumping based on commit messages
- Automatic asset creation (dockerfiles.tar.gz, configs.tar.gz)
- Release notes generation
Composite Actions
actions/setup-pnpm- pnpm setup with automatic caching- Note: Can only be used directly in workflows, not within reusable workflows from external repos
Configuration Templates
configs/nginx.conf- Production-ready nginx configuration for SPAs- Gzip compression
- Security headers
- Static asset caching
- React Router support
Dockerfiles
dockerfiles/Dockerfile.javascript- Optimized Dockerfile for JavaScript/Node.js applications
🚀 Key Features
1. Multi-Registry Docker Support
- name: Build and Push
uses: klever-labs/workflows/.github/workflows/docker-build.yml@v1.0.0
with:
registry_name: gcr.io # or ghcr.io, docker.io
flavor: javascript2. Automated Releases
- Monitors changes to
dockerfiles/andconfigs/directories - Creates releases only after CI passes
- Version bumping based on conventional commits:
feat!:→ Major versionfeat:→ Minor versionfix:→ Patch version
3. Configuration Management
- Dockerfiles and configs distributed as tar.gz archives
- Automatic download during builds
- Override capability for project-specific needs
4. CI/CD Best Practices
- All workflows validated with actionlint
- Shellcheck for script quality
- YAML linting with custom rules
- Security scanning integrated
📋 Usage Example
name: CI/CD Pipeline
on:
push:
branches: [main]
jobs:
ci:
uses: klever-labs/workflows/.github/workflows/node-ci.yml@v1.0.0
with:
node-version: '20.x'
pnpm-version: '8'
docker:
needs: ci
uses: klever-labs/workflows/.github/workflows/docker-build.yml@v1.0.0
with:
registry_name: ghcr.io
flavor: javascript
extra_build_args: |
NODE_ENV=production
VERSION=${{ github.ref_name }}
secrets:
git_pass: ${{ secrets.GITHUB_TOKEN }}📚 Documentation
Comprehensive documentation is available in the docs/ directory:
usage.md- Getting started guideconventions.md- Workflow development standardsconfiguration-files.md- Config management guiderelease-process.md- Release automation detailsexamples/- Detailed examples for each workflow
🔧 Development Setup
To test workflows locally:
# Install act for local GitHub Actions testing
brew install act
# Run CI locally
make act
# Validate workflows
make validate🤝 Contributing
- Fork and clone the repository
- Create a feature branch
- Test your changes with
make test-ci - Submit a PR with clear description
📄 License
MIT License - see LICENSE file for details
🙏 Acknowledgments
- Built with GitHub Actions best practices
- Inspired by community workflow patterns
- Powered by open-source tools (actionlint, shellcheck, yamllint)
Assets included in this release:
dockerfiles.tar.gz- Contains all Dockerfiles for different build flavorsconfigs.tar.gz- Contains configuration files (nginx.conf, etc.)
These assets are automatically downloaded by the workflows when needed.