@@ -14,6 +14,18 @@ This repository contains Docker images for GitHub Actions self-hosted runners wi
1414- ** Multi-Architecture Support** : Supports both AMD64 and ARM64 architectures
1515- ** CI/CD** : Uses GitHub Actions for automated building and releasing
1616
17+ ### Setup System Details
18+
19+ The setup system reads ` src/setup.yaml ` and executes installation steps sequentially. Each step can either:
20+ - Execute a script file from ` src/scripts/ ` directory
21+ - Run inline commands directly
22+
23+ The orchestrator (` setup.sh ` ) provides:
24+ - Colored logging with timestamps
25+ - Step execution tracking
26+ - Error handling with proper exit codes
27+ - Support for both ` script ` and ` command ` step types
28+
1729## Key Commands
1830
1931### Building the Docker Image
@@ -24,25 +36,65 @@ docker build -t github-actions-runner -f src/Dockerfile src/
2436
2537# Build with specific platform
2638docker buildx build --platform linux/amd64 -t github-actions-runner -f src/Dockerfile src/
39+
40+ # Build multi-platform image
41+ docker buildx build --platform linux/amd64,linux/arm64 -t github-actions-runner -f src/Dockerfile src/
42+
43+ # Build and load into local Docker (single platform only)
44+ docker buildx build --platform linux/amd64 --load -t github-actions-runner -f src/Dockerfile src/
45+ ```
46+
47+ ### Testing the Image Locally
48+
49+ ``` bash
50+ # Run the built image
51+ docker run --rm -it github-actions-runner bash
52+
53+ # Test specific tools
54+ docker run --rm github-actions-runner python3 --version
55+ docker run --rm github-actions-runner pwsh --version
56+ docker run --rm github-actions-runner az --version
2757```
2858
2959### Adding New Tools
3060
3161To add a new tool to the image:
32- 1 . Create an installation script in ` src/scripts/ ` (e.g., ` install-newtool.sh ` )
33- 2 . Add a step to ` src/setup.yaml ` :
62+
63+ 1 . ** For complex installations** , create a script in ` src/scripts/ ` :
64+ ``` bash
65+ # src/scripts/install-newtool.sh
66+ #! /bin/bash
67+ set -euo pipefail
68+
69+ # Architecture detection if needed
70+ ARCH=$( uname -m)
71+ case ${ARCH} in
72+ x86_64) ARCH_SUFFIX=" amd64" ;;
73+ aarch64) ARCH_SUFFIX=" arm64" ;;
74+ esac
75+
76+ # Installation logic here
77+ ```
78+
79+ 2 . Add the step to ` src/setup.yaml ` :
3480 ``` yaml
3581 - name : " Install New Tool"
3682 script : " scripts/install-newtool.sh"
3783 description : " Description of what this installs"
3884 ` ` `
39- OR use inline commands:
85+
86+ 3. **For simple installations**, use inline commands:
4087 ` ` ` yaml
4188 - name : " Install New Tool"
42- command : " apt-get install -y newtool"
89+ command : " apt-get update && apt-get install -y newtool"
4390 description : " Description of what this installs"
4491 ` ` `
4592
93+ 4. Make the script executable:
94+ ` ` ` bash
95+ chmod +x src/scripts/install-newtool.sh
96+ ```
97+
4698### GitHub Actions Workflow
4799
48100The repository uses GitVersion for semantic versioning. The pipeline is triggered on:
@@ -78,4 +130,32 @@ Images are published to:
78130- Docker Hub: ` emberstack/github-actions-runner `
79131- GitHub Container Registry: ` ghcr.io/emberstack/github-actions-runner `
80132
81- Both registries receive multi-architecture manifests supporting AMD64 and ARM64.
133+ Both registries receive multi-architecture manifests supporting AMD64 and ARM64.
134+
135+ ## Development Workflow
136+
137+ ### Making Changes
138+
139+ 1 . ** Modify installation scripts** : Edit files in ` src/scripts/ ` for tool-specific changes
140+ 2 . ** Update setup configuration** : Modify ` src/setup.yaml ` to add/remove/reorder steps
141+ 3 . ** Test locally** : Build and run the image to verify changes
142+ 4 . ** Commit with semantic versioning** : Use commit messages like:
143+ - ` feat: add new tool ` (minor version bump)
144+ - ` fix: correct installation issue ` (patch version bump)
145+ - ` feat!: breaking change ` or ` +semver:major ` (major version bump)
146+
147+ ### CI/CD Pipeline Details
148+
149+ The pipeline (` pipeline.yaml ` ) consists of:
150+ 1 . ** Discovery** : Determines version and whether to build/release
151+ 2 . ** Build** : Parallel builds for each architecture
152+ 3 . ** Manifest** : Creates multi-arch manifests
153+ 4 . ** Release** : Creates GitHub releases (main branch only)
154+
155+ ### Debugging Installation Issues
156+
157+ When debugging tool installations:
158+ 1 . Check the colored output from ` setup.sh ` for the specific failing step
159+ 2 . Run the Docker build with ` --progress=plain ` for detailed output
160+ 3 . Test scripts individually inside a running container
161+ 4 . Verify architecture-specific logic for ARM64 vs AMD64
0 commit comments