| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Continuous Integration / Lint (push) Successful in 17s
|
||
| .forgejo | ||
| .markdownlint.json | ||
| .yamllint | ||
| Dockerfile.base | ||
| Dockerfile.docker | ||
| Dockerfile.security | ||
| README.md | ||
Forgejo CI
Reusable CI/CD platform for Forgejo, providing container images and workflows for consistent automation across Forgejo repositories.
Overview
Forgejo CI is a collection of reusable container images and Git workflows designed to standardise Continuous Integration (CI) across all Forgejo repositories.
Instead of every project maintaining its own CI environment, Forgejo CI provides pre-built images containing all required tooling. This ensures every pipeline executes in a consistent, reproducible and secure environment.
Objectives
- Standardise CI across all repositories
- Reduce duplicated workflow definitions
- Improve code quality
- Enforce security best practices
- Provide consistent development environments
- Simplify repository maintenance
- Minimise CI execution time through reusable images
Container Images
Forgejo CI provides three reusable container images for Forgejo Actions.
| Image | Description |
|---|---|
| forgejo-ci:base | Common development environment and utilities |
| forgejo-ci:docker | Docker CLI and Docker Compose |
| forgejo-ci:security | Security, linting and quality assurance tools |
Workflows
Current
- Continuous Integration
- Markdown validation
- YAML validation
- ShellCheck
- Hadolint
Planned
- Docker
- Security
- Release
Design Principles
Forgejo CI is built around three principles:
- Reusable container images
- Minimal and modular workflows
- Consistent standards across repositories
Each workflow executes inside a purpose-built container image, ensuring identical tooling and behaviour across every repository while avoiding repetitive dependency installation during CI execution.
Features
- Reusable container images
- Docker-based execution
- Pre-installed development tools
- Security scanning
- Secret detection
- Vulnerability scanning
- YAML validation
- Markdown validation
- Dockerfile validation
- Shell script validation
- Consistent development environments
Repository Structure
.
├── .forgejo
│ └── workflows
│ └── ci.yml
├── Dockerfile.base
├── Dockerfile.docker
├── Dockerfile.security
├── .markdownlint.json
├── .yamllint
└── README.md
Included Tools
Base Image
- Bash
- Git
- Curl
- wget
- jq
- yq
Docker Image
- Docker CLI
- Docker Compose
Security Image
Quality
- markdownlint
- yamllint
- ShellCheck
- Hadolint
- pre-commit
Security
- Gitleaks
- Trivy
- Syft
- Grype
Development
Clone the repository:
git clone https://git.ruiguimaraes.net/forgejo/forgejo-ci.git
cd forgejo-ci
Build the security image:
docker build \
-f Dockerfile.security \
-t git.ruiguimaraes.net/forgejo/forgejo-ci:security \
.
Run Hadolint locally:
hadolint Dockerfile.base
hadolint Dockerfile.docker
hadolint Dockerfile.security
Roadmap
- Base container image
- Docker container image
- Security container image
- Continuous Integration workflow
- Docker workflow
- Security workflow
- Release workflow
- Repository template
- Template update utility
- Automatic image versioning
- Documentation website
Related Projects
- Forgejo
- Forgejo Runner
- forgejo-repo-template
Contributing
Contributions, suggestions and improvements are welcome.
Please ensure all validation checks pass before submitting changes.
License
This project is licensed under the MIT License.