feat: automated version badge updates and CI/CD improvements
Some checks failed
CI/CD Pipeline / CI Pipeline (push) Failing after 16m21s

This commit is contained in:
2026-04-06 19:07:02 +02:00
parent 96cbfc99bb
commit c8b0dbd0a1
4 changed files with 69 additions and 4 deletions

View File

@@ -708,6 +708,43 @@ docker compose -f docker-compose.cicd-test.yml up
7. **Multi-Arch Builds**: Support ARM64, Windows builds
8. **Matrix Testing**: Test across multiple Go versions
## Automated Version Badge Workflow
The CI/CD pipeline includes an automated workflow for maintaining version badges in README.md:
```mermaid
graph TD
A[Developer Pushes Commit] --> B{Commit Type?}
B -->|feat:| C[Bump MINOR version]
B -->|fix:| D[Bump PATCH version]
B -->|breaking:| E[Bump MAJOR version]
B -->|other| F[No version bump]
C --> G[Update VERSION file]
D --> G[Update VERSION file]
E --> G[Update VERSION file]
G --> H[Update main.go Swagger version]
H --> I[Update README.md version badge]
I --> J[Commit & Push changes]
J --> K[Skip CI to prevent loops]
```
### Workflow Details
1. **Trigger**: Push events to main branch with specific commit message patterns
2. **Version Detection**: Parses commit messages for conventional commit types
3. **Automatic Bumping**: Increments version based on commit type (feat → minor, fix → patch, breaking → major)
4. **File Updates**: Updates VERSION file, Swagger documentation, and README.md badge
5. **Automatic Commit**: CI Bot commits changes with `[skip ci]` to prevent infinite loops
6. **Push**: Automatically pushes the version update back to the repository
### Benefits
- **Automatic Maintenance**: README.md version badge always stays current
- **No Manual Intervention**: Developers don't need to remember to update badges
- **Consistent Versioning**: Follows semantic versioning automatically
- **Audit Trail**: Version bumps are tracked in git history
- **CI/CD Integration**: Seamlessly integrated with existing pipeline
## References
- [Gitea Actions Documentation](https://docs.gitea.com/next/usage/actions/)