Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Docker Image CI
name: Build Docker

on:
workflow_run:
workflows: [Build]
types:
- completed
release:
types: [published]

jobs:
build:
Expand All @@ -20,7 +18,7 @@ jobs:
. \
--file Dockerfile \
--tag amulet-editor:latest \
--build-arg AMULET_VERSION=${{ github.event.release.tag_name }}
--build-arg AMULET_VERSION=LOCAL

- name: Save Docker image to tar archive
run: |
Expand Down
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ FROM python:3.9-bullseye
RUN apt-get update && apt install libgtk-3-dev dbus-x11 wget libnotify4 -y
RUN pip install --upgrade pip
RUN wget https://extras.wxpython.org/wxPython4/extras/linux/gtk3/debian-11/wxPython-4.2.0-cp39-cp39-linux_x86_64.whl && pip install wxPython-4.2.0-cp39-cp39-linux_x86_64.whl
ARG AMULET_VERSION # defaults to the latest version if no arg is given in build command.
RUN pip install amulet-map-editor==$AMULET_VERSION
ARG AMULET_VERSION=RELEASE # defaults to the latest version if no arg is given in build command.
RUN if [ "$AMULET_VERSION" = "LOCAL" ]; then \
pip install .; \
elif [ "$AMULET_VERSION" = "RELEASE" ]; then \
pip install --upgrade --upgrade-strategy eager amulet-map-editor; \
elif [ "$AMULET_VERSION" = "BETA" ]; then \
pip install --upgrade --upgrade-strategy eager amulet-map-editor>=0b0; \
elif [ "$AMULET_VERSION" = "ALPHA" ]; then \
pip install --upgrade --upgrade-strategy eager amulet-map-editor>=0a0; \
else \
pip install --upgrade --upgrade-strategy eager amulet-map-editor==$AMULET_VERSION; \
fi
RUN apt-get install libSDL2-2.0 -y

ENTRYPOINT [ "/usr/local/bin/python", "-m", "amulet_map_editor" ]
Loading