Skip to content

ci: build images on GitHub and deploy to mittwald container hosting - #99

Merged
maaaathis merged 6 commits into
mainfrom
ci/ghcr-build-images
Nov 19, 2026
Merged

maaaathis merged 6 commits into
mainfrom
ci/ghcr-build-images

Conversation

@ntdoJanneck

@ntdoJanneck ntdoJanneck commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Why

Moves the extension from the Kubernetes/Helm setup deployed from GitLab towards mittwald container hosting: images are built on GitHub, stored in GHCR, and released into a mittwald container stack.

What

.github/workflows/build-images.yaml – build & publish

  • Builds web (packages/web2/Dockerfile) and executor (packages/executor/Dockerfile) in one matrix, so both images always come from the same commit (they share packages/storage).

  • Pushes to ghcr.io/mittwald/extension-accessibility-checker/{web,executor}:

    Trigger Push Tags
    tag v* yes sha-<commit>, <tag> – then deploys
    pull request no (build only) –
    manual dispatch on a v* tag yes (rebuild, no deploy) sha-<commit>, <tag>
    manual dispatch on a branch no (build only) –

    Pushes to main publish and deploy nothing.

  • linux/amd64 only, GHA build cache, OCI labels, built-in GITHUB_TOKEN, actions pinned to SHAs.

deploy/stack.yaml – the container stack

  • web (port 3000), executor, mongo:8 with a volume; CPU/memory limits per service (first estimate, to be tuned).
  • Images and extension ID/secret are template placeholders filled at deploy time; a missing one fails the deploy.

.github/workflows/deploy.yaml – deploy

  • Deploys the sha-<commit> images of a release tag via mittwald/deploy-container-action – it never builds.
  • Called by build-images.yaml after a v* tag, or manually with a tag as input (also the rollback path). Manual runs must start from main.
  • Before touching the stack it checks the tag format, that the tag points to a commit on main, that both images exist in GHCR, and that all settings are present. Mongo is never recreated by a deploy.

.gitlab-ci.yml – removed

The GitLab project that ran it (build to the GitLab registry, Helm deploy to Kubernetes) is archived, so the file no longer did anything. GitHub Actions is now the only build and deploy path.

Setup needed before the first deploy

Repository Actions secrets and variables (Settings → Secrets and variables → Actions); the tag build passes the secrets on to the deploy with secrets: inherit:

Kind Name
secret MITTWALD_API_TOKEN, EXTENSION_SECRET
variable MITTWALD_STACK_ID, EXTENSION_ID, optional DEPLOYMENT_URL

Once in the mStudio project: add ghcr.io as a registry (classic token with read:packages) and point the domain to web:3000.

Review notes

  • There is no deploy path to the current Kubernetes production any more (GitLab is archived). It keeps running its last deployed version until the switch-over; new releases only reach the container stack.
  • If a secret or variable is missing, the deploy job on v* tags fails at the config check. Once configured, the stack runs with its own (empty) database next to the Kubernetes production, so it should point to a test extension until the actual switch-over (including data migration).
  • The first v* tag after merge creates the GHCR packages – please check they are private.
  • deploy-container-action is pinned by SHA, but it runs the floating ghcr.io/mittwald/deploy-container-action:v1 image. It also only logs (does not fail) when recreating a service fails – check the containers in mStudio after a deploy.
  • Verified: actionlint and Prettier pass; both images build for linux/amd64 (locally and in this PR's run); deploy/stack.yaml renders and validates with the action's image using dummy values (fails only at the API call with a fake token, as expected). Nothing has been deployed to a real stack yet.

🤖 Generated with Claude Code

ntdoJanneck and others added 2 commits November 19, 2026 09:27
Adds a GitHub Actions workflow that builds both images (amd64) from the
same commit and pushes them to ghcr.io/mittwald/extension-accessibility-checker/{web,executor}.

- push to main: sha-<commit> and latest
- v* tags: sha-<commit> and the tag name
- pull requests: build only, no push

First step towards deploying the extension to mittwald container hosting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- deploy/stack.yaml: web, executor and MongoDB (with auth and a volume)
  as a mittwald container stack; images, extension credentials and the
  Mongo password are filled in at deploy time.
- deploy.yaml: deploys the sha-<commit> images of a release tag via
  mittwald/deploy-container-action. Callable from build-images.yaml and
  manually (tag as input, also used for rollbacks). Checks the tag, that
  both images exist in GHCR and that all settings of the "production"
  environment are present before touching the stack.
- build-images.yaml: calls the deploy after building a v* tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ntdoJanneck ntdoJanneck changed the title ci: build and push web and executor images to GHCR ci: build images on GitHub and deploy to mittwald container hosting Nov 19, 2026
ntdoJanneck and others added 4 commits November 19, 2026 10:14
The GitLab project that ran this pipeline (build to the GitLab registry,
Helm deploy to Kubernetes) is archived. Builds and deploys now run on
GitHub Actions only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Build Images no longer runs on pushes to main and drops the latest tag;
  images are only published for v* tags (PRs still build without pushing).
- Deploy refuses tags that do not point to a commit on main.
- MongoDB follows the major version (mongo:8) instead of pinning 8.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maaaathis
maaaathis merged commit d3425b0 into main Nov 19, 2026
4 checks 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.

2 participants