mirror of
https://github.com/mtan93/homeassistant-addons.git
synced 2026-03-08 05:21:51 +00:00
Update eufy-ha-mqtt-bridge to prebuild images
This commit is contained in:
@@ -11,25 +11,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- run: cd eufy-ha-mqtt-bridge && ./version-updater.sh
|
- run: cd eufy-ha-mqtt-bridge && ./version-updater.sh
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v3
|
|
||||||
with:
|
|
||||||
title: Update eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }}
|
|
||||||
commit-message: Update eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }}
|
|
||||||
committer: Max Winterstein <MaxWinterstein@users.noreply.github.com>
|
|
||||||
author: Max Winterstein <MaxWinterstein@users.noreply.github.com>
|
|
||||||
assignees: MaxWinterstein
|
|
||||||
body: |
|
|
||||||
Update report
|
|
||||||
- Update related files of eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }} [Changelog][1]
|
|
||||||
- Build docker image, check [DockerHub][2]
|
|
||||||
|
|
||||||
[1]: https://github.com/matijse/eufy-ha-mqtt-bridge/releases
|
|
||||||
[2]: https://hub.docker.com/r/maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge
|
|
||||||
if: ${{ env.CONTINUE }}
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
if: ${{ env.CONTINUE }}
|
if: ${{ env.CONTINUE }}
|
||||||
@@ -45,13 +29,29 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
if: ${{ env.CONTINUE }}
|
if: ${{ env.CONTINUE }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Test build
|
||||||
uses: docker/build-push-action@v2
|
uses: home-assistant/builder@master
|
||||||
with:
|
with:
|
||||||
context: eufy-ha-mqtt-bridge/
|
args: |
|
||||||
file: eufy-ha-mqtt-bridge/Dockerfile-real
|
--all \
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
--aarch64 \
|
||||||
push: true
|
--target eufy-ha-mqtt-bridge \
|
||||||
tags: |
|
--docker-hub maxwinterstein
|
||||||
maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge:${{ env.ADDON_NEXT_VERSION }}
|
if: ${{ env.CONTINUE }}
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
with:
|
||||||
|
title: Update eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }}
|
||||||
|
commit-message: Update eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }}
|
||||||
|
committer: Max Winterstein <MaxWinterstein@users.noreply.github.com>
|
||||||
|
author: Max Winterstein <MaxWinterstein@users.noreply.github.com>
|
||||||
|
assignees: MaxWinterstein
|
||||||
|
body: |
|
||||||
|
Update report
|
||||||
|
- Update related files of eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }} [Changelog][1]
|
||||||
|
- Build docker image, check [DockerHub][2]
|
||||||
|
|
||||||
|
[1]: https://github.com/matijse/eufy-ha-mqtt-bridge/releases
|
||||||
|
[2]: https://hub.docker.com/r/maxwinterstein/
|
||||||
if: ${{ env.CONTINUE }}
|
if: ${{ env.CONTINUE }}
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.10.0] - 2021-02-14
|
||||||
|
- Use Pre-build containers (no more unused docker images, yay).
|
||||||
|
**🚨 !!Important Update Notice!! 🚨**
|
||||||
|
The Update progress might fail when the installed version is <1.10.0.
|
||||||
|
Copy your *Configuration* to your clipboard and Uninstall/Install manually.
|
||||||
|
|
||||||
|
|
||||||
## [1.9.0] - 2021-02-05
|
## [1.9.0] - 2021-02-05
|
||||||
- Update `eufy-ha-mqtt-bridge` to `0.2.10` [Changelog](https://github.com/matijse/eufy-ha-mqtt-bridge/releases)
|
- Update `eufy-ha-mqtt-bridge` to `0.2.10` [Changelog](https://github.com/matijse/eufy-ha-mqtt-bridge/releases)
|
||||||
- Add new configration option `mqtt.keepalive`
|
- Add new configration option `mqtt.keepalive`
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
# sneaky trick to get around the requirement of {arch}-variabe based docker repositories
|
ARG BUILD_FROM
|
||||||
|
FROM $BUILD_FROM
|
||||||
|
|
||||||
FROM maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge:1.9.0
|
ARG VERSION=0.2.10
|
||||||
|
|
||||||
|
RUN apk add --no-cache nodejs npm make g++
|
||||||
|
|
||||||
|
# add source and unpack
|
||||||
|
ADD "https://github.com/matijse/eufy-ha-mqtt-bridge/archive/${VERSION}.tar.gz" /src.tar.gz
|
||||||
|
RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1
|
||||||
|
|
||||||
|
# install all (and json2yaml for cofiguration parsing)
|
||||||
|
WORKDIR /app
|
||||||
|
RUN npm install && npm install -g json2yaml && echo ${VERSION} > /version
|
||||||
|
|
||||||
|
COPY run.sh /
|
||||||
|
RUN chmod a+x /run.sh
|
||||||
|
CMD [ "/run.sh" ]
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
FROM hassioaddons/debian-base
|
|
||||||
ENV LANG C.UTF-8
|
|
||||||
|
|
||||||
ARG VERSION=0.2.10
|
|
||||||
|
|
||||||
# install node and build tools (needed by node-pre-gy)
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt install -y nodejs g++ make python
|
|
||||||
|
|
||||||
# add source and unpack
|
|
||||||
ADD "https://github.com/matijse/eufy-ha-mqtt-bridge/archive/${VERSION}.tar.gz" /src.tar.gz
|
|
||||||
RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1
|
|
||||||
|
|
||||||
# install all (and json2yaml for cofiguration parsing)
|
|
||||||
WORKDIR /app
|
|
||||||
RUN npm install && npm install -g json2yaml && echo ${VERSION} > /version
|
|
||||||
|
|
||||||
COPY run.sh /
|
|
||||||
RUN chmod a+x /run.sh
|
|
||||||
CMD [ "/run.sh" ]
|
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
|
---
|
||||||
|
# 🚨 !!Important Update Notice!! 🚨
|
||||||
|
This addon recently switched to pre-build images. The Update progress might fail when the installed version is <0.6.0.
|
||||||
|
Copy your *Configuration* to your clipboard and Uninstall/Install manually.
|
||||||
|
---
|
||||||
|
|
||||||
# Home Assistant Add-on: Eufy Home Assistant MQTT Bridge
|
# Home Assistant Add-on: Eufy Home Assistant MQTT Bridge
|
||||||
## Based on https://github.com/matijse/eufy-ha-mqtt-bridge/
|
## Based on https://github.com/matijse/eufy-ha-mqtt-bridge/
|
||||||
|
|
||||||
|
|||||||
9
eufy-ha-mqtt-bridge/build.json
Normal file
9
eufy-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": "Eufy Home Assistant MQTT Bridge",
|
"name": "Eufy Home Assistant MQTT Bridge",
|
||||||
"version": "1.9.0",
|
"version": "1.10.0",
|
||||||
"slug": "eufy-ha-mqtt-bridge",
|
"slug": "eufy-ha-mqtt-bridge",
|
||||||
|
"image": "maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge-{arch}",
|
||||||
"description": "Publish events as MQTT messages",
|
"description": "Publish events as MQTT messages",
|
||||||
"arch": [
|
"arch": [
|
||||||
"armhf",
|
"armhf",
|
||||||
"armv7",
|
"armv7",
|
||||||
"aarch64",
|
"aarch64",
|
||||||
"amd64"
|
"amd64",
|
||||||
|
"i386"
|
||||||
],
|
],
|
||||||
"startup": "application",
|
"startup": "application",
|
||||||
"boot": "auto",
|
"boot": "auto",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ echo "Newest version of eufy-ha-mqtt-bridge: $MQTT_BRIDGE_VERSION"
|
|||||||
echo "MQTT_BRIDGE_VERSION=$MQTT_BRIDGE_VERSION" >> $GITHUB_ENV
|
echo "MQTT_BRIDGE_VERSION=$MQTT_BRIDGE_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
echo "Check if $MQTT_BRIDGE_VERSION is already used..."
|
echo "Check if $MQTT_BRIDGE_VERSION is already used..."
|
||||||
grep "ARG VERSION=${MQTT_BRIDGE_VERSION}" Dockerfile-real && { echo "Version is the same, nothing to do"; exit 0; } || echo "Version is different, will continue..."
|
grep "ARG VERSION=${MQTT_BRIDGE_VERSION}" Dockerfile && { echo "Version is the same, nothing to do"; exit 0; } || echo "Version is different, will continue..."
|
||||||
echo "CONTINUE=true" >> $GITHUB_ENV;
|
echo "CONTINUE=true" >> $GITHUB_ENV;
|
||||||
|
|
||||||
echo "Reading current addon version"
|
echo "Reading current addon version"
|
||||||
@@ -16,8 +16,7 @@ echo "Update config..."
|
|||||||
sed -i.bak "s|\ \ \"version\": \".*$|\ \ \"version\": \"$ADDON_NEXT_VERSION\",|" config.json
|
sed -i.bak "s|\ \ \"version\": \".*$|\ \ \"version\": \"$ADDON_NEXT_VERSION\",|" config.json
|
||||||
|
|
||||||
echo "Update Dockerfile..."
|
echo "Update Dockerfile..."
|
||||||
sed -i.bak "s|eufy-ha-mqtt-bridge:.*$|eufy-ha-mqtt-bridge:${ADDON_NEXT_VERSION}|" Dockerfile
|
sed -i.bak "s|VERSION=.*$|VERSION=${MQTT_BRIDGE_VERSION}|" Dockerfile
|
||||||
sed -i.bak "s|VERSION=.*$|VERSION=${MQTT_BRIDGE_VERSION}|" Dockerfile-real
|
|
||||||
|
|
||||||
echo "Update CHANGELOG..."
|
echo "Update CHANGELOG..."
|
||||||
sed -i.bak "2 a ## [${ADDON_NEXT_VERSION}] - $(date +%Y-%m-%d)" CHANGELOG.md
|
sed -i.bak "2 a ## [${ADDON_NEXT_VERSION}] - $(date +%Y-%m-%d)" CHANGELOG.md
|
||||||
|
|||||||
Reference in New Issue
Block a user