Problem Statement
Currently, documentation-only changes (README updates, ADR additions, Jekyll configuration) trigger full ARM64 Talos image rebuilds in our CI pipeline. This wastes compute resources and creates unnecessary noise in build history.
Current Behavior
Any push to main triggers full build pipeline:
on:
push:
branches: [ main ]
# No path filtering - docs changes trigger expensive builds
Impact:
- ~15-20 minute builds for trivial documentation updates
- Unnecessary GitHub Actions minutes consumption
- Cluttered container registry with identical images
- False positive "new build" notifications
Scope of Documentation Files
Files that should NOT trigger rebuilds:
docs/** # All documentation
*.md # Markdown files (README, etc.)
_config.yml # Jekyll configuration
index.md # GitHub Pages homepage
CONTEXT-HANDOFF.md # Project context
Proposed Solution
1. Path-Based Build Filtering
on:
push:
branches: [ main ]
paths:
- 'patches/**'
- '.github/workflows/build-talos-images.yml'
- '!docs/**'
- '!*.md'
- '!_config.yml'
2. Conditional Job Execution
jobs:
check-changes:
outputs:
should-build: ${{ steps.changes.outputs.build }}
steps:
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
build:
- 'patches/**'
- '.github/workflows/**'
Expected Outcomes
Implementation Considerations
- Workflow Paths: Should we use
paths or paths-ignore?
- Exception Handling: What if docs include new build requirements?
- LATEST-BUILD.md: Should it have a different update mechanism for docs-only changes?
- GitHub Pages: Ensure docs-only changes still trigger Pages deployment
Test Cases
Should Trigger Builds:
- Patch file changes (
patches/01-arm64-spin-tailscale.patch)
- Workflow changes (
.github/workflows/build-talos-images.yml)
- New extensions or build logic
Should NOT Trigger Builds:
- ADR additions (
docs/ADRs/ADR-004-new-decision.md)
- README updates (
README.md)
- Jekyll config (
_config.yml)
- Documentation fixes (
docs/SESSION-LEARNINGS.md)
Related Context
This optimization will improve developer experience and reduce infrastructure costs while maintaining proper build triggers for actual code changes.
Problem Statement
Currently, documentation-only changes (README updates, ADR additions, Jekyll configuration) trigger full ARM64 Talos image rebuilds in our CI pipeline. This wastes compute resources and creates unnecessary noise in build history.
Current Behavior
Any push to main triggers full build pipeline:
Impact:
Scope of Documentation Files
Files that should NOT trigger rebuilds:
Proposed Solution
1. Path-Based Build Filtering
2. Conditional Job Execution
Expected Outcomes
Implementation Considerations
pathsorpaths-ignore?Test Cases
Should Trigger Builds:
patches/01-arm64-spin-tailscale.patch).github/workflows/build-talos-images.yml)Should NOT Trigger Builds:
docs/ADRs/ADR-004-new-decision.md)README.md)_config.yml)docs/SESSION-LEARNINGS.md)Related Context
.github/workflows/build-talos-images.ymlThis optimization will improve developer experience and reduce infrastructure costs while maintaining proper build triggers for actual code changes.