5d-diplomacy-with-multiverse-time-travel icon indicating copy to clipboard operation
5d-diplomacy-with-multiverse-time-travel copied to clipboard

dev: build and distribute images on merge

Open tefkah opened this issue 1 week ago • 2 comments

This PR adds additional CI that will build the client and server images on push to main, and will upload them as ${repo_owner}/5ddwtt-(client|server) packages linked to the current repo.

So for this repo it would be Oliveriver/5ddwtt-client

I already updated the docker-compose.yml to use the (yet to be published) images instead of having users build the images themselves.

https://github.com/tefkah/5d-diplomacy-with-multiverse-time-travel/blob/4f8eb43f1b722a05dc38d71b89dc7b863fc2aed0/docker-compose.yml#L1-L18

I think distributing the images here and not requiring would-be-users to build it themselves slightly lowers the barrier of entry.

You can see the successful CD run here: https://github.com/tefkah/5d-diplomacy-with-multiverse-time-travel/actions/runs/13402391800

You can see the images here:

  • https://github.com/tefkah/5d-diplomacy-with-multiverse-time-travel/pkgs/container/5ddwmt-server
  • https://github.com/tefkah/5d-diplomacy-with-multiverse-time-travel/pkgs/container/5ddwmt-client

Testing

You can try out the images by doing docker compose up -d with the following docker-compose.yml.

(this is just the docker-compose.yml in the current PR, but with tefkah instead Oliveriver)

services:
  frontend:
    # uncomment to build locally
    # build: client/
    image: ghcr.io/tefkah/5ddwmt-client:latest
    ports:
      - 5173:8080
    restart: always
  backend:
    # uncomment to build locally
    # build: server/
    image: ghcr.io/tefkah/5ddwmt-server:latest
    environment:
      - 'Provider=Sqlite'
      - 'ConnectionStrings__Sqlite=Data Source=./mount/5dDiplomacy.db'
    volumes:
      - ./server/mount:/app/mount
    restart: always

It should work the same as the current, but without a build step.

Tagging structure

The images are tagged with the sha, a timestamp, and latest. I just covered the spectrum, if you would prefer a different tagging system or a versioning approach let me know!

Notes

Thanks for creating this amazing crazy thing! I hope that this contribution is useful, let me know if you need me to do anything else to get this in!

tefkah avatar Feb 19 '25 00:02 tefkah