Skip to content

Add GitHub Actions workflow to build and push Docker image; update docker-compose for standalone use#3

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-github-workflow-build-push
Draft

Add GitHub Actions workflow to build and push Docker image; update docker-compose for standalone use#3
Copilot wants to merge 2 commits intomainfrom
copilot/add-github-workflow-build-push

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 27, 2026

Users need a way to run MDPCalib without checking out the full source — just docker-compose.yaml + a local .env file should be sufficient. The container image should be built and published automatically on every push to main and on version tags.

Changes

.github/workflows/docker-build-push.yml

  • Triggers on push to main, v* tags, and workflow_dispatch
  • Authenticates to ghcr.io with the built-in GITHUB_TOKEN (no extra secrets)
  • Publishes ghcr.io/lcas/mdpcalib:latest from main; semver tags (1.2.3, 1.2) from version tags
  • Uses GHA cache (type=gha) to speed up rebuilds

docker-compose.yaml

  • Switches from build: context: . to image: ${MDPCALIB_IMAGE:-ghcr.io/lcas/mdpcalib:latest}
  • Data path, display, and image reference are all configurable via .env:
MDPCALIB_IMAGE=ghcr.io/lcas/mdpcalib:latest
DATA_PATH=/absolute/path/to/your/data
DISPLAY=:0
XAUTHORITY=

.env.example

  • Documents all supported variables with inline comments; serves as the template users copy to .env

README.md

  • Adds a Quick start block (download docker-compose.yaml + .env.example, edit .env, docker compose run) that requires no source checkout
  • Adds a Local dev block showing how to override with docker-compose.override.yml to build from source with ./src mounted

.gitignore

  • Adds .env so local environment files are never accidentally committed

…rt, add .env.example, update README

Agent-Logs-Url: https://github.com/LCAS/MDPCalib/sessions/780fdaf0-353c-492b-ad82-dee7b0de0d96

Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub workflow to build container and push to registry Add GitHub Actions workflow to build and push Docker image; update docker-compose for standalone use Apr 27, 2026
Copilot AI requested a review from marc-hanheide April 27, 2026 09:46
@marc-hanheide marc-hanheide requested review from cooperj and removed request for marc-hanheide April 27, 2026 10:30
env:
REGISTRY: ghcr.io
# github.repository is 'LCAS/MDPCalib'; ghcr.io automatically lowercases
# the path, so the published image is ghcr.io/lcas/mdpcalib.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the correct way that we want to do this instead of hosting on lcas.lincoln.ac.uk

Comment thread docker-compose.yaml
environment:
- DISPLAY
- XAUTHORITY
- DISPLAY=${DISPLAY:-:0}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to instead configure lcas.lincoln.ac.uk/vnc so that you arent relying on having access to /tmp/.X11-unix (i.e. for a remote machine)

Comment thread README.md
cp .env.example .env
# Edit .env (not .env.example) and set DATA_PATH to your local data directory
```
3. Allow GUI applications (e.g. RViz) to connect to your display:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As previous, if we use the vnc container we dont need to do this.

Comment thread .env.example
# Docker image to use.
# Use a specific version tag for reproducible deployments, e.g.:
# MDPCALIB_IMAGE=ghcr.io/lcas/mdpcalib:v1.0.0
MDPCALIB_IMAGE=ghcr.io/lcas/mdpcalib:latest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed to be ran here, instead can we hard code in the compose file?

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.

add a github workflow to build the container and push it to our registry

4 participants