Skip to content

Commit 066b085

Browse files
authored
release: Promote develop to main (Multi-arch support + fixes)
Promotes all integrated changes from develop to main including multi-architecture container support. **Key Features:** - ✅ Standard Runner: Full AMD64 + ARM64 support - ⚠️ Chrome/Chrome-Go Runners: AMD64-only (Chrome limitation) - Multi-platform builds with Buildx + QEMU - Comprehensive testing and documentation All 18 CI/CD jobs passed. Ready for production release. Closes #1044
1 parent 8d0e11c commit 066b085

11 files changed

Lines changed: 1271 additions & 116 deletions

File tree

.github/copilot-instructions.md

Lines changed: 138 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This repository is for setting up and managing GitHub Actions self-hosted runner
99
- ALWAYS follow the established development workflow and branch protection rules
1010
- NEVER create .md files in the root directory; all documentation must go in `/docs/` subdirectories
1111
- ALWAYS use the provided scripts for setup, deployment, and validation tasks
12+
- **ALWAYS use `ubuntu:questing` as the base image** for all Dockerfiles (standard, chrome, chrome-go variants)
13+
- Ubuntu Questing (25.10) provides latest browser dependencies and system libraries
14+
- Do NOT change to ubuntu:24.04 or any other base image without explicit user approval
15+
- This is a deliberate choice for accessing bleeding-edge dependencies
1216

1317
## 🚨 CRITICAL WORKFLOW & BRANCH PROTECTION RULES
1418

@@ -68,36 +72,52 @@ This repository is for setting up and managing GitHub Actions self-hosted runner
6872

6973
### Core Components (IMPLEMENTED)
7074

71-
- **Dockerfile & Docker Images**: Custom GitHub runner Docker images with pre-installed tools
72-
- **Docker Compose Configuration**: Separate compose files implemented:
73-
- `docker-compose.production.yml` - Standard runners
74-
- `docker-compose.chrome.yml` - Chrome runners with browser support
75+
- **Dockerfile & Docker Images**: Custom GitHub runner Docker images with pre-installed tools (3 variants)
76+
- **Docker Compose Configuration**: Separate compose files for each runner type:
77+
- `docker-compose.production.yml` - Standard runners with multi-stage build optimization
78+
- `docker-compose.chrome.yml` - Chrome runners with browser support and Playwright
79+
- `docker-compose.chrome-go.yml` - Chrome-Go runners with Go toolchain and browser support
7580
- **Configuration Management**: Environment variables and volume mounts for runner configuration
7681
- **Health Checks & Monitoring**: Container health monitoring and automatic restart policies
77-
- **CI/CD Pipeline**: Comprehensive testing and deployment automation
82+
- **CI/CD Pipeline**: Comprehensive testing and deployment automation with BuildKit caching
7883
- **Branch Protection**: Automated branch protection setup via scripts
84+
- **Dependabot Automation**: Auto-merge and auto-rebase workflows for zero-touch dependency updates
85+
- **Performance Optimizations**: BuildKit cache mounts, multi-stage builds, optimized image sizes
7986

8087
### Current Directory Structure
8188

8289
```
8390
├── docker/
84-
│ ├── Dockerfile # Main runner image definition
85-
│ ├── Dockerfile.chrome # Chrome runner image definition
86-
│ ├── docker-compose.production.yml # Standard runner deployment (IMPLEMENTED)
87-
│ ├── docker-compose.chrome.yml # Chrome runner deployment (IMPLEMENTED)
88-
│ ├── entrypoint.sh # Container startup script (IMPLEMENTED)
89-
│ └── entrypoint-chrome.sh # Chrome runner startup script (IMPLEMENTED)
91+
│ ├── Dockerfile # Standard runner (multi-stage, optimized)
92+
│ ├── Dockerfile.chrome # Chrome runner with Playwright
93+
│ ├── Dockerfile.chrome-go # Chrome-Go runner with Go 1.25.4
94+
│ ├── docker-compose.production.yml # Standard runner deployment
95+
│ ├── docker-compose.chrome.yml # Chrome runner deployment
96+
│ ├── docker-compose.chrome-go.yml # Chrome-Go runner deployment
97+
│ ├── entrypoint.sh # Container startup script
98+
│ └── entrypoint-chrome.sh # Chrome/Chrome-Go startup script
9099
├── config/
91100
│ ├── runner.env.example # Standard runner configuration template
92101
│ ├── chrome-runner.env.example # Chrome runner configuration template
93-
│ ├── runner.env # User's standard runner config (created from template)
94-
│ └── chrome-runner.env # User's Chrome runner config (optional)
102+
│ ├── chrome-go-runner.env.example # Chrome-Go runner configuration template
103+
│ ├── runner.env # User's standard runner config
104+
│ ├── chrome-runner.env # User's Chrome runner config (optional)
105+
│ └── chrome-go-runner.env # User's Chrome-Go runner config (optional)
95106
├── scripts/
96-
│ ├── build.sh # Image building automation (IMPLEMENTED)
97-
│ ├── build-chrome.sh # Chrome image building (IMPLEMENTED)
98-
│ ├── deploy.sh # Container deployment (IMPLEMENTED)
99-
│ ├── setup-branch-protection.sh # Branch protection automation (IMPLEMENTED)
100-
│ └── check-docs-structure.sh # Documentation validation (IMPLEMENTED)
107+
│ ├── build.sh # Standard image building with BuildKit
108+
│ ├── build-chrome.sh # Chrome image building with BuildKit
109+
│ ├── deploy.sh # Container deployment automation
110+
│ ├── deploy-chrome-x86.sh # Chrome runner x86 deployment
111+
│ ├── setup-branch-protection.sh # Branch protection automation
112+
│ ├── check-docs-structure.sh # Documentation validation
113+
│ └── test-dependabot.sh # Dependabot configuration validation
114+
├── .github/
115+
│ ├── workflows/
116+
│ │ ├── ci-cd.yml # Main CI/CD pipeline with caching
117+
│ │ ├── dependabot-auto-merge.yml # Auto-approve and merge Dependabot PRs
118+
│ │ ├── dependabot-rebase.yml # Hourly rebase for out-of-date PRs
119+
│ │ └── release.yml # Multi-variant release publishing
120+
│ └── dependabot.yml # Dependabot config (github-actions, docker)
101121
├── cache/ # Local cache directories (volume mounts)
102122
│ ├── build/ # Build artifacts and intermediate files
103123
│ ├── deps/ # Dependencies cache (npm, pip, etc.)
@@ -109,12 +129,14 @@ This repository is for setting up and managing GitHub Actions self-hosted runner
109129
│ ├── unit/ # Unit tests
110130
│ ├── integration/ # Integration tests
111131
│ ├── docker/ # Docker validation tests
112-
│ └── security/ # Security tests
132+
│ ├── security/ # Security tests
133+
│ └── playwright/ # Playwright screenshot tests
113134
└── docs/ # Documentation (organized structure)
114135
├── features/ # Feature specifications
115136
├── community/ # Community guidelines
116137
├── releases/ # Release notes
117-
└── archive/ # Legacy documentation
138+
├── archive/ # Legacy documentation
139+
└── PERFORMANCE_*.md # Performance baseline, optimizations, results
118140
```
119141

120142
│ └── entrypoint-chrome.sh # Chrome runner startup script
@@ -273,6 +295,54 @@ docker compose -f docker/docker-compose.chrome.yml up -d --scale github-runner-c
273295

274296
**CRITICAL**: Direct pushes to `main` and `develop` are blocked by branch protection rules.
275297

298+
### Post-Merge Back-Sync Workflow
299+
300+
After merging a PR from `develop` to `main` with squash merge:
301+
302+
```bash
303+
# Sync develop with main to prevent "ahead" status
304+
git checkout develop
305+
git pull origin develop
306+
git merge main -m "chore: sync develop with main after squash merge"
307+
git push origin develop
308+
309+
# This triggers CI/CD validation on develop branch
310+
# Ensures develop stays in sync with main after squash merges
311+
```
312+
313+
### Dependabot Automation (ZERO-TOUCH UPDATES)
314+
315+
The repository has fully automated dependency management:
316+
317+
**Auto-Merge Workflow** (`.github/workflows/dependabot-auto-merge.yml`):
318+
- Automatically approves Dependabot PRs
319+
- Enables auto-merge with squash strategy
320+
- Merges after all CI checks pass
321+
- To disable for specific PR: `gh pr merge <PR_NUMBER> --disable-auto`
322+
323+
**Auto-Rebase Workflow** (`.github/workflows/dependabot-rebase.yml`):
324+
- Runs hourly to detect out-of-date Dependabot PRs
325+
- Automatically triggers `@dependabot rebase` command
326+
- Keeps multiple PRs current for sequential merging
327+
- Manual trigger: `gh workflow run dependabot-rebase.yml`
328+
329+
**Complete Flow**:
330+
1. Monday 09:00 - Dependabot creates PRs (github-actions, docker)
331+
2. Auto-merge workflow approves and enables auto-merge
332+
3. CI runs (builds, tests, security scans)
333+
4. First PR passes → merges automatically
334+
5. Other PRs become out-of-date
335+
6. Hourly rebase workflow detects and rebases
336+
7. CI re-runs, PRs merge sequentially
337+
8. Zero human intervention required
338+
339+
**Configuration** (`.github/dependabot.yml`):
340+
- Ecosystems: `github-actions`, `docker` (npm managed in Dockerfiles)
341+
- Schedule: Weekly, Monday 09:00
342+
- Target branch: `develop`
343+
- Rebase strategy: `auto`
344+
- Labels: `dependencies`, ecosystem-specific tags
345+
276346
### Common Operations
277347

278348
- **Runner Registration**: Docker entrypoint scripts handle GitHub API token management and single repository runner registration
@@ -371,6 +441,36 @@ Use the dedicated Chrome runner for web UI tests requiring browser automation
371441

372442
## Performance Optimization
373443

444+
### BuildKit Cache Optimizations (IMPLEMENTED)
445+
446+
All Dockerfiles leverage BuildKit cache mounts for maximum performance:
447+
448+
**Cache Mount Types**:
449+
- `--mount=type=cache,target=/var/cache/apt` - APT package cache
450+
- `--mount=type=cache,target=/var/lib/apt` - APT lists cache
451+
- `--mount=type=cache,target=/tmp/npm-cache` - npm package cache
452+
- `--mount=type=cache,target=/tmp/downloads` - External downloads (Chrome, Node.js, Go)
453+
454+
**CI/CD Cache Configuration**:
455+
- Cross-branch cache sharing via `buildcache` scope
456+
- Feature branches benefit develop/main cache
457+
- Eliminates full rebuilds on merges
458+
- 50-70% faster builds with cache hits
459+
460+
**Performance Results** (see `docs/PERFORMANCE_RESULTS.md`):
461+
- Standard runner: 19s (96% faster than baseline)
462+
- Chrome runner: 24s (99% faster than baseline)
463+
- Chrome-Go runner: 4m 34s (48% faster than baseline)
464+
- ~985MB bandwidth saved per rebuild
465+
- 100% cache hit rate on unchanged dependencies
466+
467+
**Multi-Stage Build** (Standard Runner Only):
468+
- Builder stage: Downloads and patches runner
469+
- Runtime stage: Only runtime dependencies
470+
- Image size: 2.18GB → 1.81GB (370MB reduction, 17% smaller)
471+
- Better security: Smaller attack surface
472+
- NOT used for Chrome variants (runtime npm required)
473+
374474
### Web UI Testing Performance
375475

376476
- **Dedicated Chrome Runner**: Deployed via `docker-compose.chrome.yml` with Chrome browser optimizations for UI testing
@@ -381,6 +481,21 @@ Use the dedicated Chrome runner for web UI tests requiring browser automation
381481
### Runner Specialization Strategies
382482

383483
- **Standard Runners**: `docker-compose.production.yml` for general building, testing, and deployment tasks
384-
- **Chrome Runners**: `docker-compose.chrome.yml` for specialized browser testing with Chrome, Selenium, Playwright, Cypress
385-
- **Mixed Deployment**: Deploy both runner types simultaneously for comprehensive CI/CD coverage
386-
- **Cache-Optimized**: Both runner types include persistent volume mounts for dependency caching
484+
- Multi-stage build optimized
485+
- BuildKit cache for fast rebuilds
486+
- Image size: ~1.8GB
487+
488+
- **Chrome Runners**: `docker-compose.chrome.yml` for specialized browser testing
489+
- Chrome, Selenium, Playwright, Cypress pre-installed
490+
- BuildKit cache for downloads and npm
491+
- Playwright chromium browser binaries
492+
- Image size: ~4.1GB
493+
494+
- **Chrome-Go Runners**: `docker-compose.chrome-go.yml` for Go + browser testing
495+
- All Chrome runner features
496+
- Go 1.25.4 toolchain
497+
- BuildKit cache for Go downloads
498+
- Image size: ~4.5GB
499+
500+
- **Mixed Deployment**: Deploy multiple runner types simultaneously for comprehensive CI/CD coverage
501+
- **Cache-Optimized**: All runner types include persistent volume mounts and BuildKit caching

0 commit comments

Comments
 (0)