mirror of
https://github.com/mtan93/homeassistant-addons.git
synced 2026-03-08 05:21:51 +00:00
Update toogoodtogo-ha-mqtt-bridge to prebuild images
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## [1.2.0] - 2021-02-08
|
||||
## [1.4.0] - 2021-02-10
|
||||
- Use Pre-build containers (no more unused docker images, yay).
|
||||
**🚨 !!Important Update Notice!! 🚨**
|
||||
The Update progress might fail when the installed version is <1.4.0.
|
||||
Copy your *Configuration* to your clipboard and Uninstall/Install manually.
|
||||
|
||||
## [1.3.0] - 2021-02-08
|
||||
- Update `toogoodtogo-ha-mqtt-bridge` to `1.3.0` (see [release notes](https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/releases))
|
||||
|
||||
## [1.2.0] - 2021-02-07
|
||||
@@ -15,4 +21,4 @@
|
||||
**Add `every_n_minutes: 10` to your configuration! (See example config)**
|
||||
|
||||
## [0.1.0] - 2020-12-31
|
||||
- Initial release
|
||||
- Initial release
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
# sneaky trick to get around the requirement of {arch}-variabe based docker repositories
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:6.0.0
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
FROM maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge:1.3.0
|
||||
# Add poetry # TODO: Get rid of the overhead
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
||||
ENV PATH=$HOME/.poetry/bin/:${PATH}
|
||||
RUN poetry config virtualenvs.create false
|
||||
|
||||
# Calls for a random number to bust the cache
|
||||
# (https://stackoverflow.com/questions/35134713/disable-cache-for-specific-run-commands/58801213#58801213)
|
||||
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
|
||||
|
||||
# add source and unpack
|
||||
ADD "https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/archive/v1.3.0.tar.gz" /src.tar.gz
|
||||
RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1
|
||||
|
||||
# install
|
||||
WORKDIR /app
|
||||
RUN poetry install --no-dev
|
||||
|
||||
COPY run.sh /
|
||||
RUN chmod a+x /run.sh
|
||||
CMD [ "/run.sh" ]
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
FROM hassioaddons/base-python
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Add poetry # TODO: Get rid of the overhead
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
||||
ENV PATH=$HOME/.poetry/bin/:${PATH}
|
||||
RUN poetry config virtualenvs.create false
|
||||
|
||||
# Calls for a random number to bust the cache
|
||||
# (https://stackoverflow.com/questions/35134713/disable-cache-for-specific-run-commands/58801213#58801213)
|
||||
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
|
||||
|
||||
# add source and unpack
|
||||
ADD "https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/archive/v1.3.0.tar.gz" /src.tar.gz
|
||||
RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1
|
||||
|
||||
# install
|
||||
WORKDIR /app
|
||||
RUN poetry install --no-dev
|
||||
|
||||
COPY run.sh /
|
||||
RUN chmod a+x /run.sh
|
||||
CMD [ "/run.sh" ]
|
||||
@@ -1,8 +1,16 @@
|
||||
---
|
||||
# 🚨 !!Important Update Notice!! 🚨
|
||||
This addon recently switched to pre-build images. The Update progress might fail when the installed version is <1.4.0.
|
||||
Copy your *Configuration* to your clipboard and Uninstall/Install manually.
|
||||
---
|
||||
|
||||
|
||||
|
||||
# Home Assistant Add-on: TooGoodToGo Home Assistant MQTT Bridge
|
||||
## Based on https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge
|
||||
|
||||
---
|
||||
## 🚨 This is some experimental release! 🚨
|
||||
### 🚨 This is some experimental release! 🚨
|
||||
---
|
||||
|
||||
Example Config:
|
||||
|
||||
9
toogoodtogo-ha-mqtt-bridge/build.json
Normal file
9
toogoodtogo-ha-mqtt-bridge/build.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"build_from": {
|
||||
"aarch64": "ghcr.io/hassio-addons/base-python/aarch64:6.0.0",
|
||||
"amd64": "ghcr.io/hassio-addons/base-python/amd64:6.0.0",
|
||||
"armhf": "ghcr.io/hassio-addons/base-python/armhf:6.0.0",
|
||||
"armv7": "ghcr.io/hassio-addons/base-python/armv7:6.0.0",
|
||||
"i386": "ghcr.io/hassio-addons/base-python/i386:6.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
{
|
||||
"name": "TooGoodToGo Home Assistant MQTT Bridge",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"image": "maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}",
|
||||
"slug": "tgtg-ha-mqtt-bridge",
|
||||
"description": "Publish TooGoodToGo stock as MQTT messages",
|
||||
"arch": [
|
||||
"armhf",
|
||||
"armv7",
|
||||
"aarch64",
|
||||
"amd64"
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"startup": "application",
|
||||
"boot": "auto",
|
||||
|
||||
22
toogoodtogo-ha-mqtt-bridge/helper-build-and-push.sh
Normal file
22
toogoodtogo-ha-mqtt-bridge/helper-build-and-push.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# see https://github.com/home-assistant/builder
|
||||
|
||||
if [[ $1 = "push" ]]; then
|
||||
echo 'build and push...'
|
||||
sleep 5
|
||||
echo -n Dockerhub password for maxwinterstein:
|
||||
read -s password
|
||||
echo
|
||||
docker run --privileged \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
-v $PWD/:/data homeassistant/amd64-builder \
|
||||
--all -t /data --docker-user maxwinterstein --docker-password $password #--docker-hub-check
|
||||
else
|
||||
echo 'Just testing...'
|
||||
sleep 5
|
||||
docker run --privileged -v ~/.docker:/root/.docker \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
-v $PWD/:/data homeassistant/amd64-builder \
|
||||
--amd64 --test -t /data
|
||||
fi
|
||||
Reference in New Issue
Block a user