ci: automate dev container build via devcontainer.json + workflow (#553)
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. Co-authored-by: Thomas Güttler <tilldu@googlemail.com> Reviewed-on: https://codeberg.org/guettli/sharedinbox/pulls/553
This commit was merged in pull request #553.
This commit is contained in:
committed by
guettli
co-authored by
guettli
Thomas Güttler
parent
ee238b85c7
commit
0297701829
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "SharedInbox Dev",
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile.dev",
|
||||
"context": ".."
|
||||
},
|
||||
"workspaceFolder": "/src",
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/src,type=bind,consistency=cached",
|
||||
"remoteUser": "ci"
|
||||
}
|
||||
Reference in New Issue
Block a user