feat: multi-image runners — go, node, docker, deploy, godot
Replace single fat image with purpose-built images per workflow type. Each image is lean: base (Alpine+AWS+git) → go/node/deploy extend it. docker image standalone (dind base). godot for future game builds. build-all.sh builds base first, then all others in parallel.
This commit is contained in:
@@ -1,41 +1,57 @@
|
||||
# tinqs/ci
|
||||
|
||||
Tinqs CI toolchain — composite Gitea Actions and runner base image.
|
||||
Tinqs CI toolchain — composite Gitea Actions and purpose-built runner images.
|
||||
|
||||
## Actions
|
||||
|
||||
| Action | Description | Replaces |
|
||||
|--------|-------------|----------|
|
||||
| `tinqs/ci/checkout` | Clone a Gitea repo | `actions/checkout` |
|
||||
| `tinqs/ci/setup-go` | Install Go | `actions/setup-go` |
|
||||
| `tinqs/ci/setup-node` | Install Node.js + pnpm | `actions/setup-node` |
|
||||
| `tinqs/ci/setup-aws` | Install AWS CLI + ECR login | — |
|
||||
|
||||
### Usage
|
||||
| Action | What it does |
|
||||
|--------|-------------|
|
||||
| `tinqs/ci/checkout@v1` | Clone a repo from tinqs.com |
|
||||
| `tinqs/ci/setup-go@v1` | Install Go (skips if pre-baked) |
|
||||
| `tinqs/ci/setup-node@v1` | Install Node.js + pnpm (skips if pre-baked) |
|
||||
| `tinqs/ci/setup-aws@v1` | Install AWS CLI + optional ECR login |
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: tinqs/ci/checkout@v1
|
||||
|
||||
- uses: tinqs/ci/setup-go@v1
|
||||
with:
|
||||
go-version: '1.26.2'
|
||||
|
||||
- uses: tinqs/ci/setup-node@v1
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- uses: tinqs/ci/setup-aws@v1
|
||||
with:
|
||||
ecr-login: 'true'
|
||||
ecr-repo: '149751500842.dkr.ecr.eu-west-1.amazonaws.com/tinqs-git'
|
||||
```
|
||||
|
||||
## Runner Base Image
|
||||
## Runner Images
|
||||
|
||||
`runner-image/` contains the Dockerfile for the CI runner container. Pre-installs Go, Node.js, AWS CLI, Docker, git, and ssh — no per-job install overhead.
|
||||
Each workflow type gets a lean, purpose-built runner image. No fat "everything" image.
|
||||
|
||||
| Image | `runs-on` | Contents | Used by |
|
||||
|-------|-----------|----------|---------|
|
||||
| **base** | — | Alpine + git + AWS CLI + SSH | Foundation for all others |
|
||||
| **go** | `go` | base + Go 1.26 | build-tstudio, deploy-proxy |
|
||||
| **node** | `node` | base + Node 22 + pnpm | deploy-docs |
|
||||
| **docker** | `docker` | docker:dind + Go + AWS CLI | build (platform), deploy-bot |
|
||||
| **deploy** | `deploy` | base only (lightest) | deploy-arikigame, release |
|
||||
| **godot** | `godot` | base + headless Godot 4.6 + export templates | ariki-game builds (future) |
|
||||
|
||||
### Build all images
|
||||
|
||||
```bash
|
||||
cd runner-image
|
||||
./build-push.sh v1
|
||||
cd images
|
||||
./build-all.sh v1
|
||||
```
|
||||
|
||||
Images push to ECR as `tinqs-runner-{name}:v1`.
|
||||
|
||||
### How routing works
|
||||
|
||||
The Lambda dispatcher reads `runs-on:` from the workflow and starts a Fargate task with the matching image:
|
||||
|
||||
```
|
||||
runs-on: go → tinqs-runner-go (Go builds)
|
||||
runs-on: node → tinqs-runner-node (frontend builds)
|
||||
runs-on: docker → tinqs-runner-docker (Docker image builds)
|
||||
runs-on: deploy → tinqs-runner-deploy (S3/ECS deploys)
|
||||
runs-on: godot → tinqs-runner-godot (game exports)
|
||||
runs-on: host → legacy runner (forge-runner, temporary)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user