ci: automate dev container build via devcontainer.json + workflow #553

Merged
guettlibot merged 1 commits from refs/pull/553/head into main 2026-06-09 19:31:48 +00:00
guettlibot commented 2026-06-09 14:26:39 +00:00 (Migrated from codeberg.org)

Closes #552

Summary

  • Add .devcontainer/devcontainer.json pointing at ../Dockerfile.dev so VS Code / Codespaces / any devcontainer-aware tool can build the dev environment directly from source.
  • Add .forgejo/workflows/publish-dev-container.yml that rebuilds Dockerfile.dev and pushes it to codeberg.org/guettli/sharedinbox-dev whenever Dockerfile.dev, the devcontainer config, or the workflow itself changes on main. The image is tagged both :latest and with the short commit SHA for pinnable references.
  • The workflow uses the built-in FORGEJO_TOKEN to log in to Codeberg's container registry — no extra secrets required.

Notes

  • No existing references to ghcr.io/guettli/sharedinbox-dev were found in the repo, so issue step 3 (updating image references) is a no-op here.
  • workflow_dispatch is also enabled so the image can be rebuilt manually if needed.

Verification

  • python3 -c "import json; json.load(...)" parses the devcontainer config.
  • python3 -c "import yaml; yaml.safe_load(...)" parses the workflow.
  • Triggers (paths filter) match the source files the issue identifies as drift risks.
Closes #552 ## Summary - Add `.devcontainer/devcontainer.json` pointing at `../Dockerfile.dev` so VS Code / Codespaces / any devcontainer-aware tool can build the dev environment directly from source. - Add `.forgejo/workflows/publish-dev-container.yml` that rebuilds `Dockerfile.dev` and pushes it to `codeberg.org/guettli/sharedinbox-dev` whenever `Dockerfile.dev`, the devcontainer config, or the workflow itself changes on `main`. The image is tagged both `:latest` and with the short commit SHA for pinnable references. - The workflow uses the built-in `FORGEJO_TOKEN` to log in to Codeberg's container registry — no extra secrets required. ## Notes - No existing references to `ghcr.io/guettli/sharedinbox-dev` were found in the repo, so issue step 3 (updating image references) is a no-op here. - `workflow_dispatch` is also enabled so the image can be rebuilt manually if needed. ## Verification - `python3 -c "import json; json.load(...)"` parses the devcontainer config. - `python3 -c "import yaml; yaml.safe_load(...)"` parses the workflow. - Triggers (paths filter) match the source files the issue identifies as drift risks.
Sign in to join this conversation.