This document describes the automated CI/CD pipeline for renovate-scheduler.
The project uses GitHub Actions to automate:
- Code Quality: Linting and testing on every PR
- Security: Vulnerability scanning
- Releases: Automated versioning, changelog generation, and artifact creation
- Dependencies: Automated dependency updates
Trigger: Every PR to main and every push to main
Jobs:
- Runs
golangci-lintfor code quality checks - Verifies
go.mod/go.sumconsistency - Enforces code style standards
Configuration: 5-minute timeout
- Runs
go test -raceto detect race conditions - Collects code coverage metrics
- Uploads coverage to Codecov
- Fails if critical issues detected
Coverage Target: Tracks and reports coverage changes
- Compiles the binary
- Verifies successful build
- Binary set with version commit SHA
- Builds Docker image using multi-stage builds
- Tests image build success
- Caches layers for speed
- Runs Trivy vulnerability scanner on filesystem
- Scans for critical and high severity issues
- Uploads results to GitHub Security tab (SARIF format)
- Allows high-confidence false positives
Trigger: Every push to main
Functionality:
- Uses release-please-action
- Automatically creates release PRs when changes are detected
- Groups changes by type (features, fixes, docs, etc.)
- Bumps version using semantic versioning:
- major (breaking):
v1.0.0 - minor (feature):
v1.1.0 - patch (fix):
v1.0.1
- major (breaking):
Changelog Categories:
- Features (visible)
- Bug Fixes (visible)
- Performance (visible)
- Documentation (visible)
- Tests (hidden, internal)
- Refactoring (hidden, internal)
- Miscellaneous/Chore (hidden, internal)
Trigger: Push of any git tag matching v* (e.g., v1.0.0)
Multi-platform Builds:
Builds for all major platforms:
- Linux: amd64, arm64
- macOS: amd64, arm64
- Windows: amd64 (as .exe)
Archives:
.tar.gzfor Unix-like systems.zipfor Windows
- Builds multi-platform images (amd64, arm64)
- Pushes to GitHub Container Registry (GHCR)
- Tags:
vX.Y.Zandlatest - Image repository:
ghcr.io/mieliespoor/renovate-scheduler
- Extracts changelog section from
CHANGELOG.md - Includes all changes from release PR
- Attached to GitHub Release
- Created automatically when tag is pushed
- Includes release notes from changelog
- Contains all binary artifacts
Automated Dependency Updates:
- Weekly updates (Mondays at 02:00 UTC)
- Max 5 open PRs
- Label:
dependencies,go - Commit prefix:
chore(deps)
- Weekly updates (Mondays at 03:00 UTC)
- Max 5 open PRs
- Label:
dependencies,github-actions - Commit prefix:
ci(actions)
- Weekly updates (Tuesdays at 02:00 UTC)
- Max 3 open PRs
- Label:
dependencies,docker - Commit prefix:
chore(docker)
All PRs are assigned to mieliespoor for review.
git checkout -b feat/new-feature
# ... make changes ...
git commit -m "feat(scheduler): add new polling interval configuration"
git push origin feat/new-feature- GitHub Actions runs automatically
- ✅ Lint check passes
- ✅ All tests pass
- ✅ Security scan passes
- PR is reviewed and merged
- release-please creates PR with:
- Version bump from
v0.1.0→v0.2.0(minor version) - Updated
CHANGELOG.mdwith feature - Organized by change type
- Version bump from
- Review and merge release PR
- This triggers release-build workflow
- Git tag
v0.2.0is created - Workflow builds:
- Multi-platform binaries
- Docker images for both architectures
- Uploads artifacts to GitHub Release
- Release published with changelog as release notes
The release process depends on Conventional Commits:
<type>(<scope>): <subject>
Types (impacts version bump):
feat→ Minor version bumpfix→ Patch version bumpBREAKING CHANGE→ Major version bumpdocs,test,chore,refactor→ No version bump (release-please omits)
Examples:
feat(scheduler): add support for custom polling intervals
fix(ingest): correct digest calculation for file changes
perf(dispatch): optimize concurrent job claiming
docs: update README with configuration examples
test(integration): add end-to-end loop tests
chore(deps): update golangci-lint to v1.60.0
Main CI pipeline for quality gates
Automated release PR creation
Artifact building on tag creation
Automated dependency updates
Optional GoReleaser configuration (alternative release tooling)
Hand-maintained changelog for pre-automation releases (release-please updates this)
None! The pipelines use:
GITHUB_TOKEN(automatically provided by GitHub)- Public image registry (GHCR)
- All checks must pass before merging PRs
- Branch protection rules enforce this
- Codecov integration tracks coverage trends
- Reports on PR diffs
- GitHub automatically monitors security advisories
- Trivy scans on each build
- Auto-PRs for dependency updates
- Review and merge to keep dependencies current
When adding new workflows:
- Create file in
.github/workflows/new-workflow.yml - Define triggers (on: pull_request, push, schedule, etc.)
- Add jobs with clear names
- Use consistent style and error handling
- Document in this guide
- Check workflow logs in GitHub Actions tab
- Common issues:
- Linting: Run
golangci-lint runlocally - Tests: Run
go test -race ./...locally - Build: Check
go build ./...
- Linting: Run
- Check if commits follow conventional commit format
- Verify commit is on
mainbranch - Release-please requires specific commit patterns
- Verify GHCR credentials are configured
- Check GitHub Actions have package:write permission
- Check
.github/dependabot.ymlis valid YAML - Verify schedule times (consider timezone)
- Enable Dependabot in repository settings
- Commit Messages: Use conventional commits for accurate versioning
- Testing: Write tests for all new features
- Dependencies: Review Dependabot PRs timely to stay current
- Releases: Let release-please handle versioning (don't manually tag)
- Security: Address security scan findings before merge
- Documentation: Keep CHANGELOG updated with user-facing changes