mirror of
https://github.com/mtan93/homeassistant-addons.git
synced 2026-03-07 21:21:50 +00:00
Update eufy-ha-mqtt-bridge to prebuild images
This commit is contained in:
@@ -11,25 +11,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- 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
|
||||
uses: docker/setup-qemu-action@v1
|
||||
if: ${{ env.CONTINUE }}
|
||||
@@ -44,14 +28,30 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
if: ${{ env.CONTINUE }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
|
||||
- name: Test build
|
||||
uses: home-assistant/builder@master
|
||||
with:
|
||||
context: eufy-ha-mqtt-bridge/
|
||||
file: eufy-ha-mqtt-bridge/Dockerfile-real
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge:${{ env.ADDON_NEXT_VERSION }}
|
||||
args: |
|
||||
--all \
|
||||
--aarch64 \
|
||||
--target eufy-ha-mqtt-bridge \
|
||||
--docker-hub maxwinterstein
|
||||
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 }}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# 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
|
||||
- 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`
|
||||
|
||||
@@ -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
|
||||
## 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",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"slug": "eufy-ha-mqtt-bridge",
|
||||
"image": "maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge-{arch}",
|
||||
"description": "Publish events as MQTT messages",
|
||||
"arch": [
|
||||
"armhf",
|
||||
"armv7",
|
||||
"aarch64",
|
||||
"amd64"
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"startup": "application",
|
||||
"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 "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 "Reading current addon version"
|
||||
@@ -16,8 +16,7 @@ echo "Update config..."
|
||||
sed -i.bak "s|\ \ \"version\": \".*$|\ \ \"version\": \"$ADDON_NEXT_VERSION\",|" config.json
|
||||
|
||||
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-real
|
||||
sed -i.bak "s|VERSION=.*$|VERSION=${MQTT_BRIDGE_VERSION}|" Dockerfile
|
||||
|
||||
echo "Update CHANGELOG..."
|
||||
sed -i.bak "2 a ## [${ADDON_NEXT_VERSION}] - $(date +%Y-%m-%d)" CHANGELOG.md
|
||||
|
||||
Reference in New Issue
Block a user