This directory contains GitHub Actions workflows for building the refactored crankshaft image.
Builds the refactored crankshaft image using the latest pi-gen structure.
- Manual Dispatch: Run builds on-demand with configurable parameters
- Push to main: Automatic builds when crankshaft code changes
- Pull Requests: Validation builds for pull requests affecting crankshaft
- version: Build version identifier (default: 'DEV')
- target_arch: Target architecture (armhf/arm64, default: armhf)
- release: Debian release (trixie/bookworm, default: trixie)
-
Environment Setup
- Ubuntu latest runner
- QEMU for multi-architecture support
- Docker Buildx
- Disk space optimization
-
Configuration
- Dynamic config generation based on inputs
- Hardware feature enablement (I2C, SPI, UART)
- Modern compression settings (xz)
-
Build Execution
- Docker-based build using refactored structure
- 8-hour timeout for complex builds
- Comprehensive error handling
-
Artifact Management
- Main image artifacts
- Checksum files (MD5, SHA1, SHA256)
- Build logs for debugging
-
Release Creation (conditional)
- Automatic GitHub releases for 'csng' versions
- Release notes with build information
- All artifacts attached to release
# Navigate to Actions tab in GitHub
# Select "build-crankshaft-refactored" workflow
# Click "Run workflow"
# Configure parameters as neededBuilds trigger automatically when:
- Code is pushed to main branch in
crankshaft/directory - Pull requests modify
crankshaft/directory
- crankshaft-refactored-[date]-[version]: Main build artifacts
- build-logs-failure-[date]-[version]: Logs if build fails
The workflow generates a config file with:
IMG_NAME=crankshaft-[release]-[arch]
ENABLE_SSH=0
ARCH=[specified_architecture]
RELEASE=[specified_debian_release]
DEPLOY_COMPRESSION=xz
COMPRESSION_LEVEL=6
ENABLE_I2C=1
ENABLE_SPI=1
ENABLE_UART=1
STAGE_LIST="stage0 stage1 stage2 stage3 stage4"- armhf: 32-bit ARM (Raspberry Pi 2/3/4)
- arm64: 64-bit ARM (Raspberry Pi 4/5)
- User credentials are commented out by default
- SSH is disabled by default
- Only essential services enabled
- Build Timeouts: 8-hour limit for complex builds
- Disk Space: Automatic cleanup of unnecessary packages
- Log Access: Build logs uploaded as artifacts
- Version Conflicts: Use unique version strings
The workflow includes notification steps for:
- ✅ Successful builds
- ❌ Failed builds with details