diff --git a/Makefile b/Makefile index 1c226f1..35e4cf0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,20 @@ run_locally: - docker-compose build + $(MAKE) build_images docker-compose up -d docker-compose ps +build_images: + ARCH=amd64 docker-compose -f docker-compose.build.yaml build + ARCH=armhf docker-compose -f docker-compose.build.yaml build + ARCH=armv7 docker-compose -f docker-compose.build.yaml build + ARCH=aarch64 docker-compose -f docker-compose.build.yaml build + ARCH=i386 docker-compose -f docker-compose.build.yaml build + +push_images: + ARCH=amd64 docker-compose -f docker-compose.build.yaml push + ARCH=armhf docker-compose -f docker-compose.build.yaml + ARCH=armv7 docker-compose -f docker-compose.build.yaml build + ARCH=aarch64 docker-compose -f docker-compose.build.yaml build + ARCH=i386 docker-compose -f docker-compose.build.yaml build + diff --git a/config.yaml b/config.yaml index 5cd00be..15faf3f 100644 --- a/config.yaml +++ b/config.yaml @@ -1,8 +1,9 @@ name: Shortumation -version: 0.0.4c +version: 0.0.5 slug: shortumation url: "https://github.com/asosnovsky/Shortumation" description: "A homeassitant addon which provides better UI for automations & scripts." +image: "asosnovsky/shortumation:{arch}-latest" arch: - armhf - armv7 diff --git a/docker-compose.build.yaml b/docker-compose.build.yaml new file mode 100644 index 0000000..b8199b9 --- /dev/null +++ b/docker-compose.build.yaml @@ -0,0 +1,9 @@ +version: '3' +services: + addon: + image: "asosnovsky/shortumation:${ARCH:-amd64}-${BUILD_TAG:-latest}" + build: + context: "./" + dockerfile: "./Dockerfile" + args: + - BUILD_FROM=homeassistant/${ARCH:-amd64}-base:latest diff --git a/docker-compose.yaml b/docker-compose.yaml index 5d284e3..7cd192c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,12 +1,7 @@ version: '3' services: addon: - image: "local/shortumation:${BUILD_TAG:-latest}" - build: - context: "./" - dockerfile: "./Dockerfile" - args: - - BUILD_FROM=homeassistant/amd64-base:latest + image: "asosnovsky/shortumation:${ARCH:-amd64}-${BUILD_TAG:-latest}" volumes: - "./sample_config:/config" ports: