Document Version: 1.0
Last Updated: 2025-01-01
Audience: Developers, Maintainers, Build Engineers
This guide provides a comprehensive overview of all GitHub Actions workflows in the Crankshaft CI/CD system. It explains the purpose, triggers, configuration, and usage of each workflow.
| Workflow | File | Trigger | Duration | Purpose | Status |
|---|---|---|---|---|---|
| Quality Feedback | quality.yml |
Pull Request | ~5 min | Detect code quality issues early | ✅ Production |
| Platform Builds | build.yml |
Push to main/feature branches | ~25 min | Build binaries for amd64, arm64, armhf | ✅ Production |
| APT Repository | apt.yml |
Successful build on main | ~10 min | Publish packages to APT repo | ✅ Production |
| Release | release.yml |
Version tag or manual dispatch | ~30 min | Create GitHub releases with artifacts | ✅ Production |
| Pi-Gen Images | pi-gen.yml |
Manual dispatch or scheduled | ~90 min | Build Raspberry Pi OS images | ✅ Production |
| Documentation | docs.yml |
Push to main or PR | ~3 min | Build and deploy documentation | ✅ Production |
Purpose: Provide rapid feedback on code quality issues in pull requests
Trigger Events:
- Pull request opened, synchronised, or reopened
- Push to any branch (with filter for documentation-only changes)
Key Steps:
- Check out code
- Run quality checks (clang-tidy, cppcheck, CodeQL, etc.)
- Post quality report as PR comment
- Set status check pass/fail
Configuration:
- Runs on: Ubuntu latest
- Concurrency: 1 per PR (cancels previous runs)
- Timeout: 10 minutes
- Success Criteria: All checks pass
Usage:
# Automatically triggered on PR creation
git push origin feature/my-feature
# Wait for quality feedback in PR commentsExpected Output:
- PR comment with violations summary
- Status check showing "Quality Gate" pass/fail
- Links to detailed reports
Purpose: Build binaries for all supported architectures (amd64, arm64, armhf)
Trigger Events:
- Push to
mainbranch - Push to
feature/*orrelease/*branches - Manual dispatch (workflow_dispatch) with optional architecture filter
Key Steps:
- Determine target architectures based on branch
- Set up build environment (Docker, dependencies)
- Run multi-architecture build
- Upload artifacts to GitHub Actions
- Generate build report
Configuration:
- Main branch: Builds all architectures (amd64, arm64, armhf)
- Feature branches: Builds amd64 only (fast feedback)
- Release branches: Builds all architectures
- Parallel jobs: One per architecture
- Artifact retention: 30 days
- Timeout: 45 minutes
Usage:
# Automatic on push to main
git push origin main
# Automatic on feature branch (amd64 only)
git push origin feature/my-feature
# Manual trigger with all architectures
# Use GitHub Actions UI → "Run workflow" → select all architecturesExpected Output:
- Build artifacts (deb packages) for each architecture
- Build report with size, time, warnings
- Status check showing "Build" pass/fail
Purpose: Publish built packages to the APT repository for Debian/Ubuntu systems
Trigger Events:
- Successful build.yml completion on main branch
- Manual dispatch with package list
Key Steps:
- Download artifacts from build workflow
- Add packages to APT repository
- Generate repository metadata
- Update GPG signatures
- Deploy to package server
- Run APT repository tests
Configuration:
- Distribution: Debian Trixie
- Sections: main
- GPG signing: Enabled with signing key
- Artifact retention: Permanent (in repository)
- Timeout: 20 minutes
Usage:
# Automatic after successful build
# Packages available within 5 minutes:
apt-get update
apt-get install crankshaft-ui crankshaft-core
# Manual dispatch for specific packages
# Use GitHub Actions UI → "Run workflow" → enter package pathsExpected Output:
- Updated APT repository metadata
- Packages indexed by architecture
- Repository signature validation passes
Purpose: Create GitHub releases and publish artifacts
Trigger Events:
- Push of version tag (v*..)
- Manual dispatch (workflow_dispatch) with optional existing build-run-id
Key Steps:
Mode A: Tag-triggered release:
- Trigger build workflow for new artifacts
- Wait for build completion
- Download artifacts
- Create GitHub release
- Upload artifacts to release
- Generate release notes
- Publish release
Mode B: Manual release from existing build:
- Download artifacts from specified build-run-id
- Validate artifacts exist and are valid
- Create GitHub release (draft if requested)
- Upload artifacts
- Publish release
Configuration:
- Tag pattern: v[0-9]+.[0-9]+.[0-9]+*
- Artifact retention: Permanent (in release)
- Draft mode: Supported for manual review
- Timeout: 60 minutes
Usage:
Creating release from new tag:
# Tag and push triggers release automatically
git tag v1.2.3
git push origin v1.2.3
# Release created automatically with fresh artifactsCreating release from existing build:
# Via GitHub Actions UI:
# 1. Go to Actions → Release
# 2. Click "Run workflow"
# 3. Enter build-run-id (e.g., "12345")
# 4. Select create_draft=true for review
# 5. Workflow uses existing artifactsExpected Output:
- GitHub Release with version tag
- Artifacts attached (deb, sha256sums, etc.)
- Release notes with changelog
Purpose: Build customised Raspberry Pi OS images with Crankshaft pre-installed
Trigger Events:
- Manual dispatch (workflow_dispatch)
- Scheduled (optional: weekly build)
- Successful APT publish (on main branch)
Key Steps:
- Clone/update pi-gen repository
- Configure APT repository (stable or nightly)
- Set up build environment
- Build Pi OS images (lite, full)
- Verify image boots
- Upload images as artifacts
- Generate image report (checksum, size)
Configuration:
- APT channel: Stable (production) or Nightly (testing)
- Image types: Lite (minimal), Full (with UI)
- Architecture support: armhf, arm64
- Build environment: Privileged container
- Artifact retention: 30 days
- Timeout: 120 minutes
Usage:
# Manual trigger for custom build
# Use GitHub Actions UI → "Run workflow"
# Select: apt_channel (stable/nightly), image_types
# Scheduled weekly build (optional)
# Automatically runs every Monday at 02:00 UTCExpected Output:
- Compressed Pi OS images (.xz)
- Checksums (SHA256)
- Boot verification report
- Installation instructions
Purpose: Build and deploy project documentation
Trigger Events:
- Push to main branch
- Push to branches with documentation changes
- Manual dispatch
Key Steps:
- Check out documentation source
- Build documentation (Sphinx/Doxygen)
- Validate links and formatting
- Deploy to GitHub Pages (on main only)
- Create build report
Configuration:
- Builder: Sphinx + Doxygen
- Deployment: GitHub Pages
- Timeout: 15 minutes
- Artifact retention: 7 days (temporary)
Usage:
# Automatic on documentation changes
git push origin main
# Documentation available at:
# https://opencardev.github.io/crankshaft/Expected Output:
- Built documentation in HTML
- Published to GitHub Pages
- Link validation report
Developer push
↓
Quality.yml runs
↓ (passes)
Build.yml triggered
├─ Builds amd64 (feature branch)
└─ Builds all archs (main branch)
↓ (success)
Apt.yml triggered (if main branch)
├─ Publishes to APT repo
└─ Triggers Pi-gen.yml (on main)
└─ Builds Pi OS images
↓
Tag push (v*.*.*)
↓
Release.yml triggered
├─ Uses latest build artifacts
└─ Creates GitHub Release
Quality Feedback:
- Concurrency key:
pr-{pull_number} - Cancellation: Previous runs cancelled by new push
Platform Builds:
- Concurrency key:
build-{branch} - Cancellation: Previous runs cancelled by new push
- Exception: Manual dispatch runs are not cancelled
APT Repository:
- Concurrency key:
apt-publish - Cancellation: Only one publish at a time
Release:
- No concurrency limits (each release is independent)
All workflows post status checks to pull requests and commits:
| Check | Pass Criteria | Fail Behaviour |
|---|---|---|
| Quality Gate | All quality checks pass | Blocks merge |
| Build | All platforms build successfully | Blocks merge |
| APT Publish | Repository valid, tests pass | Manual retry in Actions |
| Release | Artifacts verified, release created | Manual retry in Actions |
| Pi-Gen Build | Images boot successfully | Notifies maintainers |
Location: Actions → Quality Feedback → Run workflow
Inputs:
branch: Target branch (default: main)
Location: Actions → Platform Builds → Run workflow
Inputs:
architectures: Comma-separated list (amd64, arm64, armhf)branch: Target branchbuild-aasdk: (Optional) Build AASDK from submodule (default: false)aasdk-dev-version: (Optional) Pin APT package version forlibaasdk-dev.- Example:
2026.02.28-1+deb13u1 - When set, build image installs:
libaasdk-dev=<version>
- Example:
Location: Actions → APT Repository → Run workflow
Inputs:
apt_channel: stable or nightlypackage_paths: Paths to package files
Location: Actions → Release → Run workflow
Inputs:
build_run_id: (Optional) Use existing build artifactscreate_draft: (Optional) Create as draft for review
Location: Actions → Pi-Gen Images → Run workflow
Inputs:
apt_channel: stable or nightlyimage_types: Comma-separated (lite, full)
| Secret | Purpose | Setup |
|---|---|---|
ACTIONS_ARTIFACT_KEY |
Encryption key for artifacts | Set in repo secrets |
APT_REPO_DEPLOY_KEY |
SSH key for APT server | Set in repo secrets |
GPG_SIGNING_KEY |
GPG key for package signing | Set in repo secrets |
GPG_KEY_PASSPHRASE |
Passphrase for GPG key | Set in repo secrets |
GITHUB_TOKEN |
GitHub API access | Auto-provided by Actions |
| Variable | Value | Used In |
|---|---|---|
REGISTRY |
ghcr.io | All workflows |
IMAGE_NAME |
crankshaft-build-env | Build workflow |
ARTIFACT_RETENTION |
30 | Build, Pi-Gen |
APT_DISTRO |
trixie | APT, Pi-Gen |
# Via GitHub UI
Actions → [Workflow Name] → [Run] → Logs
# Via GitHub CLI
gh run list --repo opencardev/crankshaft
gh run view {run_id} --log# Via GitHub CLI
gh run rerun {run_id} --failed# Via GitHub UI
Actions → [Run] → Artifacts → Download
# Via GitHub CLI
gh run download {run_id} --name {artifact_name}- Push code to feature branch
- Quality workflow runs (automatic)
- Review violations in PR comment
- Fix issues locally
- Push fix (workflow runs again)
- Quality passes → Ready to merge
Time to feedback: ~5 minutes
- Feature branch created
- Push triggers build (amd64 only by default)
- To test all architectures:
- Go to
Actions → Platform Builds → Run workflow - Select all architectures
- Click "Run workflow"
- Go to
- Download artifacts and test locally
Time to all-arch build: ~25 minutes
- Merge PR to main
- Build workflow runs → artifacts created
- APT workflow runs → repository updated
- Packages available on systems running:
apt-get update apt-get upgrade crankshaft-ui
Time to APT availability: ~15 minutes total
Option A: Automatic (tag-based)
git tag v1.2.3
git push origin v1.2.3
# Release created automaticallyOption B: Manual (from existing build)
- Identify stable build-run-id (from Actions)
- Go to
Actions → Release → Run workflow - Enter build-run-id
- Create as draft for review
- When ready, publish release
- Release becomes official
Time to release: ~5-30 minutes (depending on freshness of build)
- Go to
Actions → Pi-Gen Images → Run workflow - Select:
apt_channel: stable (for production) or nightly (for testing)image_types: lite (minimal) or full (with UI)
- Wait for build (~90 minutes)
- Download images
- Write to SD card and boot on Raspberry Pi 4
Time to ready-to-boot images: ~90 minutes
| Issue | Solution | Reference |
|---|---|---|
| Quality checks failing | Review PR comment, fix violations, push again | See troubleshooting.md |
| Build timeout | Reduce parallel jobs, check build.yml | See troubleshooting.md |
| APT publish fails | Verify repository access, check GPG setup | See troubleshooting.md |
| Release missing artifacts | Verify build-run-id valid, check artifact retention | See troubleshooting.md |
| Pi-Gen images won't boot | Check APT channel, verify kernel compatibility | See troubleshooting.md |
See troubleshooting.md for detailed troubleshooting steps.
- Read about workflows in detail: See workflow YAML files in
.github/workflows/ - Troubleshoot issues: See
troubleshooting.md - Understand architecture: See
architecture-decisions.md - Developer tasks: See
developer-handbook.md - Maintenance tasks: See
maintainer-handbook.md
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025-01-01 | Initial version with all 6 core workflows |