spawn/.github/workflows
Ahmed Abushagur ed98a59318
feat(digitalocean): Packer nightly snapshot pipeline for fast boot (#2198)
* feat(digitalocean): Packer nightly snapshot pipeline for fast boot

Add pre-built Packer snapshots for DigitalOcean droplets. Instead of
10-20 min cloud-init + agent install on every boot, snapshot-based
droplets boot in ~2-3 min (SSH only, agent pre-installed).

- Packer HCL2 template with parametrized agent/tier builds
- Agent build matrix (packer/agents.json) for all 7 agents
- Tier scripts mirroring cloud-init.ts package tiers
- Nightly GitHub Actions workflow (4 AM UTC, max-parallel: 3)
- Automatic cleanup: keeps only latest snapshot per agent
- CLI: findSpawnSnapshot() looks up pre-built images via DO API
- CLI: waitForSshOnly() skips cloud-init when using snapshots
- CLI: createServer() accepts optional snapshotId, skips user_data
- CLI: main.ts routes to fast path when snapshot detected
- Tests for findSpawnSnapshot() (5 cases, all passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(packer): use var-file for install_commands to avoid shell quoting issues

The previous approach passed install_commands as `-var` inline, but
GitHub Actions expands `${{ }}` before shell evaluation — JSON arrays
with `|`, `&&`, and `"` characters break shell quoting.

Fix: generate a `.auto.pkrvars.json` file (auto-loaded by Packer)
using jq with --argjson for safe JSON handling. Also route all
`${{ inputs }}` and `${{ matrix }}` values through env vars to
prevent script injection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:47:46 -08:00
..
cli-release.yml feat: migrate to openrouter.ai/labs/spawn CDN + release artifact version checks (#2178) 2026-03-03 23:34:58 -08:00
discovery.yml fix: Node.js v22 upgrade, aider uv install, SSH & cloud reliability (#1440) 2026-02-18 06:54:07 -05:00
docker.yml feat!: remove Fly.io cloud provider support (#1979) 2026-02-27 00:06:32 -05:00
gate.yml fix: allow repo collaborators through the gate workflow (#1166) 2026-02-14 18:32:50 -08:00
lint.yml refactor: extract inline hook commands to TypeScript scripts (#2174) 2026-03-03 23:05:41 -08:00
packer-snapshots.yml feat(digitalocean): Packer nightly snapshot pipeline for fast boot (#2198) 2026-03-04 20:47:46 -08:00
qa.yml ci: bump QA cron from daily to every 4 hours (#1895) 2026-02-24 16:46:55 -08:00
refactor.yml fix: Node.js v22 upgrade, aider uv install, SSH & cloud reliability (#1440) 2026-02-18 06:54:07 -05:00
security.yml refactor: simplify claude launch — no streaming, no output monitoring (#1412) 2026-02-17 09:02:47 -08:00
test.yml ci: add Mock Tests job to satisfy required status check (#1904) 2026-02-25 00:54:33 -05:00