Skip to main content

CI/CD

All CI/CD is managed through GitHub Actions workflows in .github/workflows/.

CI Workflow

File: .github/workflows/ci.yml

Runs on every push to main/next and on pull requests targeting those branches.

Jobs

JobRunnerDescription
rust-testubuntu-latestRun Rust tests via Bazel (with PR-level impact analysis)
rust-buildubuntu-latestBuild all Rust crates and apps via Bazel
clippyubuntu-latestRun Clippy lints via Bazel rust_clippy_aspect
schemasubuntu-latestVerify OpenAPI and GraphQL schemas are up to date
rustfmtubuntu-latestCheck Rust formatting (cargo fmt --check)
lintubuntu-latestESLint across all pnpm packages
buildubuntu-latestBuild all pnpm packages (pnpm -r build)
doneubuntu-latestGate job -- fails if any upstream job failed

Impacted Target Detection (PR only)

For pull requests, the rust-test job uses bazel-diff to detect which targets changed:

  1. Generates hashes for the head commit and the base commit (via git worktree)
  2. Computes impacted targets
  3. Filters to //crates/ and //platform/ targets
  4. Only tests impacted targets, skipping unrelated code

On pushes to main/next, all targets are tested.

Schema Verification

The schemas job regenerates both API schemas and diffs them against the committed versions:

bazel run //platform/api:generate-openapi -- /tmp/schemas/openapi.json
bazel run //platform/api:generate-schema -- /tmp/schemas/schema.graphql

If either schema is outdated, the job fails with instructions to run just schemas.

Concurrency

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_type != 'tag' }}

Branch pushes cancel in-progress runs. Tag pushes are never cancelled.

Security Audit

File: .github/workflows/security-audit.yml

Runs nightly at 03:00 UTC and on manual dispatch.

Jobs

JobToolScope
rust-auditcargo auditRust dependencies (all severities)
npm-auditpnpm auditnpm dependencies (high + critical only)
daily-summaryDiscord webhookAggregated status notification

Notifications

  • Per-ecosystem alerts -- If vulnerabilities are found, a Discord webhook sends an embed with the advisory IDs and severities
  • Daily summary -- Always sent (green for "all clear", yellow for "action required")
  • Webhook secret: DISCORD_SECURITY_WEBHOOK_URL

Release Images

File: .github/workflows/release-images.yml

Triggered by GitHub releases or manual dispatch.

Workflow

  1. Verify -- Runs Bazel tests to ensure the release is stable
  2. Build & Push -- Builds Docker images and pushes to GHCR

Tag Parsing

Release tags follow the format {app}@{version} (e.g., api@2026.6.1).

For manual dispatch, you select the app and provide the tag directly:

App SelectionBuilds
allAll Rust + Web apps
all-rustAll Rust apps
all-webAll Web apps
apiAPI binary only
webWeb app only

Image Tags

Release TypeTags Applied
Stable release{version}, {major.minor}, latest, {short-sha}, {full-sha}
Pre-release (beta/alpha/rc){version}, beta, {short-sha}, {full-sha}

Registry

Images are pushed to: ghcr.io/{owner}/apollon/{app}:{tag}

Schema Artifacts

For API releases, OpenAPI and GraphQL schema files are generated and attached to the GitHub release as downloadable assets.

Runtime Base Image

File: .github/workflows/build-runtime-base.yml

Builds the shared runtime-base Docker image:

  • Trigger: Nightly (04:00 UTC), manual dispatch, or changes to docker/runtime-base.Dockerfile
  • Platforms: linux/amd64, linux/arm64 (multi-arch via docker buildx)
  • Tags: {short-sha}, {full-sha}, {branch}, latest (main only)

Docs Deployment

Documentation is deployed to Cloudflare Pages with a two-tier strategy:

Branch/TriggerEnvironment
next branchStaging (preview URL)
20* tags (e.g., 2026.6.1)Production

Other Workflows

WorkflowFileTriggerDescription
Sync Labelssync-labels.ymlPush to main/nextSynchronize GitHub labels for issues/PRs
Clean Cacheclean-cache.ymlPR closedClean up GitHub Actions caches for the PR branch

Required Secrets

SecretUsed InPurpose
BUILDBUDDY_API_KEYCI, Release ImagesBazel remote cache (BuildBuddy)
DISCORD_SECURITY_WEBHOOK_URLSecurity AuditDiscord notification webhook
CF_DOCS_API_TOKENDeploy DocsCloudflare Pages API token
CF_DOCS_ACCOUNT_IDDeploy DocsCloudflare account ID
GITHUB_TOKENRelease ImagesGHCR authentication (auto-provided)