Skip to content

CI/CD

Workflows, runner routing, Discord notifications, auto-merge, and release pipeline.

Standard Workflow Set (All 7 App Repos)

Every app repo has these 8 workflows:

Workflow Trigger Purpose
auto-merge.yml check_suite completed Auto-merge when CI + Copilot pass
request-review.yml pull_request opened Request Review-E, create Discord #tasks thread
pr-comments-to-discord.yml issue_comment Forward PR comments to Discord thread
forward-copilot-reviews.yml pull_request_review Forward Copilot review to Discord
build-status-to-discord.yml check_suite completed Post build status to Discord thread
auto-resolve-copilot-conversations.yml check_suite completed Resolve Copilot conversation threads
notify-failure.yml workflow_run completed Discord alert on CI failure
release-please.yml push to main Version bump, changelog, GitHub Release, auto-merge release PR

Known gaps: Drink-E and Heart-E missing monitor-xcode and post-release-check. Cutie missing forward-copilot, auto-resolve, notify-failure. Nutri-E auto-merge on older version. Tracked in issue #309.

Runner Routing

Job Type Runner Label Host
iOS build/test [self-hosted, macOS, ARM64, ios] MacBook Air M4
Android build [self-hosted, macOS, ios] MacBook Air M4 (AAPT2 x86 via Rosetta)
Linux CI (linting, scripts) arc-linux-{repo} Dell k3s (ARC)
Docker-in-Docker arc-linux-docker Dell k3s (nutri-e only)

Rule: Never use ubuntu-latest alone. Always use self-hosted runners to avoid paid GitHub-hosted costs.

Auto-Merge Pipeline

  1. PR opened → request-review.yml creates Discord thread, tags Review-E
  2. CI runs on self-hosted runner
  3. Copilot reviews automatically
  4. auto-merge.yml triggers on check_suite completion:
  5. Waits for CI (10 min timeout)
  6. Waits for Copilot (60s)
  7. Checks unresolved conversations
  8. Squash merges
  9. Merge notification posted to Discord thread

Auto-merge reliability: ~60% under load. ARC runners sometimes don't spin up. Manual merge via gh pr merge as fallback (note: no Discord merge notification when merging manually).

Release Pipeline

  1. Conventional commits on main trigger release-please
  2. Release PR opened automatically with version bump + changelog
  3. Release PR auto-approved via RELEASE_PAT (Review-E PAT, expires 2026-05-30)
  4. Release PR auto-merged
  5. GitHub Release created with tag
  6. release-notes-to-discord.yml posts release notes to Discord

All actions SHA-pinned for security.

Discord Integration Flow

PR Created
  → request-review.yml → Discord #tasks thread (stores message ID in PR comment)
  → Review-E picks up from Discord notification

CI Runs
  → build-status-to-discord.yml → Updates Discord thread

Copilot Reviews
  → forward-copilot-reviews.yml → Posts to Discord thread

PR Merged/Closed
  → notify-closed job → Posts resolution to Discord thread (using stored message ID)

Key pattern: Discord message ID stored as HTML comment in PR (<!-- discord-review-msg-id:ID -->). This ID doubles as thread ID for webhook posts (?thread_id=ID).

Xcode Cloud

Xcode Cloud GitHub App installed account-wide on Stig-Johnny. Creates check suites on ALL repos (including non-iOS MCP repos). Auto-merge workflows filter out xcode-cloud checks to avoid blocking.

Fix needed: Restrict Xcode Cloud app to selected repos only (iOS app repos) in GitHub Settings > Integrations.