diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..10f0962 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily + time: "06:00" + open-pull-requests-limit: 10 \ No newline at end of file diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..cb16f4b --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,4 @@ +template: | + ## What's Changed + + $CHANGES diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..e627dfd --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,15 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 5945ab7..ec1c09c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,10 +10,10 @@ RUN \ git \ \ && git clone -b ${MDNS_REPEATER_VERSION} --depth 1 \ - https://github.com/kennylevinsen/mdns-repeater /usr/src/mdns \ + https://github.com/pvizeli/mdns-repeater /usr/src/mdns \ && cd /usr/src/mdns \ && gcc -O3 -o /usr/bin/mdns-repeater \ - mdns-repeater.c -DHGVERSION="\"${MDNS_REPEATER_VERSION}\"" \ + mdns-repeater.c -DVERSION="\"${MDNS_REPEATER_VERSION}\"" \ \ && apk del .build-deps \ && rm -rf \ diff --git a/build.json b/build.json index 769bcb2..8f64723 100644 --- a/build.json +++ b/build.json @@ -1,14 +1,14 @@ { "image": "homeassistant/{arch}-hassio-multicast", "build_from": { - "aarch64": "homeassistant/aarch64-base:3.11", - "armhf": "homeassistant/armhf-base:3.11", - "armv7": "homeassistant/armv7-base:3.11", - "amd64": "homeassistant/amd64-base:3.11", - "i386": "homeassistant/i386-base:3.11" + "aarch64": "homeassistant/aarch64-base:3.12", + "armhf": "homeassistant/armhf-base:3.12", + "armv7": "homeassistant/armv7-base:3.12", + "amd64": "homeassistant/amd64-base:3.12", + "i386": "homeassistant/i386-base:3.12" }, "args": { - "MDNS_REPEATER_VERSION": "1.11" + "MDNS_REPEATER_VERSION": "1.1.0" }, "labels": { "io.hass.type": "multicast" diff --git a/rootfs/etc/cont-init.d/interface.sh b/rootfs/etc/cont-init.d/interface.sh new file mode 100644 index 0000000..4e26b34 --- /dev/null +++ b/rootfs/etc/cont-init.d/interface.sh @@ -0,0 +1,7 @@ +#!/usr/bin/with-contenv bashio +# ============================================================================== +# Detect active interface for mdns repeater +# ============================================================================== +interface=$(awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}' <<< "$(ip route get 8.8.8.8)") + +echo "${interface}" > /var/run/s6/container_environment/ACTIVE_INTERFACE diff --git a/rootfs/etc/services.d/mdns/run b/rootfs/etc/services.d/mdns/run index 38e7684..d7a9b59 100644 --- a/rootfs/etc/services.d/mdns/run +++ b/rootfs/etc/services.d/mdns/run @@ -2,6 +2,5 @@ # ============================================================================== # Start mDNS repeater service # ============================================================================== -interface=$(awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}' <<< "$(ip route get 8.8.8.8)") -exec mdns-repeater -f ${interface} hassio +exec mdns-repeater -f ${ACTIVE_INTERFACE} hassio