Skip to content

ci: publish multi-arch image to GHCR + self-host compose#7

Merged
jeroenniesen merged 1 commit into
mainfrom
feat/ghcr-publish
May 13, 2026
Merged

ci: publish multi-arch image to GHCR + self-host compose#7
jeroenniesen merged 1 commit into
mainfrom
feat/ghcr-publish

Conversation

@jeroenniesen
Copy link
Copy Markdown
Contributor

Summary

  • New publish-image workflow builds Stagecue as a multi-arch container (linux/amd64 + linux/arm64) and pushes to ghcr.io/expertslive/stagecue on every push to main (:edge + :sha-<short>) and on every v*.*.* tag (full semver fan-out + :latest). Uses Buildx + QEMU, the workflow's built-in GITHUB_TOKEN, and the GitHub Actions cache backend.
  • New deploy/docker-compose.yml that pulls the published image instead of building locally — self-hosters can curl two files and docker compose up without ever cloning the repo. App and SQL Server restart unless-stopped, uploads + db persist on named volumes, SQL port stays inside the network.
  • New deploy/.env.example and deploy/README.md covering required env vars (SA_PASSWORD, APP_BASE_URL), optional pinning (STAGECUE_TAG, APP_PORT), image-tag reference, upgrade steps, and the common failure modes.
  • Root README gets a "Self-host from a pre-built image" section above the existing build-from-source path, linking to deploy/README.md.

Test plan

  • Merging this PR fires the publish-image workflow on main and produces ghcr.io/expertslive/stagecue:edge plus :sha-<short>. Verify both tags appear on https://github.com/expertslive/stagecue/pkgs/container/stagecue.
  • Mark the GHCR package public under Package settings so testers don't need a PAT to pull.
  • On a fresh host, run the quick-start from deploy/README.md and confirm the stack comes up and the app is reachable on APP_BASE_URL.
  • Push a test tag (e.g. v0.1.0-rc1) and confirm the semver fan-out tags (0.1.0-rc1 and latest if non-prerelease) appear.
  • Pull the linux/arm64 variant on Apple Silicon and run it.

🤖 Generated with Claude Code

A new GitHub Actions workflow builds Stagecue as a multi-arch container
(linux/amd64 + linux/arm64) and pushes it to GitHub Container Registry
on every push to main and on every v*.*.* tag. Adds a separate
docker-compose.yml under deploy/ that pulls the published image so
self-hosters never have to clone the repo.

Workflow (.github/workflows/publish.yml)
- Triggers: push to main → :edge + :sha-<short>; v*.*.* tag → semver
  fan-out (:1.2.3, :1.2, :1, :latest) + :sha-<short>; manual dispatch
  for testing the pipeline.
- Buildx + QEMU for the two-arch build, GHCR login via the workflow's
  built-in GITHUB_TOKEN (packages:write), `type=gha` cache so repeat
  builds reuse layers.
- concurrency.group prevents overlapping pushes for the same ref;
  cancel-in-progress is off so we don't waste a half-finished
  multi-arch build.

Consumer compose (deploy/)
- docker-compose.yml references ghcr.io/expertslive/stagecue:${STAGECUE_TAG:-latest}
  (no build context), restarts the app + db `unless-stopped`, persists
  uploads + sqldata to named volumes, and exposes only the app port —
  the SQL Server port stays inside the network.
- .env.example documents the four env vars: SA_PASSWORD, APP_BASE_URL
  (required) plus STAGECUE_TAG and APP_PORT (optional).
- README.md walks through curl-based quick start, image-tag reference,
  upgrade steps, and the most common failure modes.

Root README
- Adds a "Self-host from a pre-built image" section above the existing
  build-from-source instructions, linking to deploy/README.md.
- Renames the build-from-source section header to make the split
  obvious.

Verification
- Workflow YAML and compose schema both validate.
- Dockerfile unchanged; image already builds locally via the dev
  compose.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jeroenniesen jeroenniesen merged commit 2e63cd6 into main May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant