From 9708cbe9a27bb49c95513faf5dde7f46ca06c595 Mon Sep 17 00:00:00 2001 From: yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Wed, 19 Aug 2026 17:31:36 -0400 Subject: [PATCH 1/4] ci: publish versioned Docker image tags --- .github/workflows/docker-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 268b804..23ac339 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -5,6 +5,8 @@ on: branches: - main - dev + tags: + - "v*" workflow_dispatch: inputs: image_repository: @@ -101,6 +103,7 @@ jobs: tags: | type=raw,value=main,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }} + type=raw,value=v${{ steps.package_version.outputs.version }} type=sha,format=short - name: Build and push From 2d04085b76d0fdeab5b59df879b26b9bfe88d0d5 Mon Sep 17 00:00:00 2001 From: yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Wed, 19 Aug 2026 17:42:09 -0400 Subject: [PATCH 2/4] ci: use upstream tags for fork image versions --- .github/workflows/docker-publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 23ac339..93a4f92 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -48,6 +48,10 @@ jobs: - name: Compute package version id: package_version run: | + if [ "${{ github.repository }}" != "openhop-dev/openhop_repeater" ]; then + git fetch --force https://github.com/openhop-dev/openhop_repeater.git \ + "refs/tags/*:refs/tags/*" + fi python -m pip install --disable-pip-version-check setuptools_scm version="$(python -m setuptools_scm)" echo "version=${version}" >> "$GITHUB_OUTPUT" From 05db509a6f6056dc13b3f702ca1eaa5be9bc57b7 Mon Sep 17 00:00:00 2001 From: yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Wed, 19 Aug 2026 17:47:05 -0400 Subject: [PATCH 3/4] refactor: rename bundled openHop Console build settings --- .github/workflows/docker-publish.yml | 14 +++++++------- README.md | 6 +++--- docker-compose.build.yml | 2 +- dockerfile | 26 +++++++++++++------------- env.example | 6 +++--- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 93a4f92..45c3772 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -13,8 +13,8 @@ on: description: "Docker image repository to publish to" required: false default: "" - pymc_console_version: - description: "PyMC Console release to bundle (latest or a tag such as v0.9.333)" + openhop_console_version: + description: "openHop Console release to bundle (latest or a tag such as v0.9.333)" required: false default: "latest" @@ -77,11 +77,11 @@ jobs: echo "Using image repository: ${image_repository}" echo "image_repository=${image_repository}" >> "$GITHUB_OUTPUT" - - name: Resolve bundled Console release + - name: Resolve bundled openHop Console release id: console_release shell: bash env: - REQUESTED_CONSOLE_VERSION: ${{ inputs.pymc_console_version || 'latest' }} + REQUESTED_CONSOLE_VERSION: ${{ inputs.openhop_console_version || 'latest' }} run: | set -euo pipefail @@ -95,7 +95,7 @@ jobs: cache_bust="${REQUESTED_CONSOLE_VERSION}" fi - echo "Bundling PyMC Console ${tag}" + echo "Bundling openHop Console ${tag}" echo "version=${REQUESTED_CONSOLE_VERSION}" >> "$GITHUB_OUTPUT" echo "cache_bust=${cache_bust}" >> "$GITHUB_OUTPUT" @@ -119,8 +119,8 @@ jobs: push: true build-args: | PACKAGE_VERSION=${{ steps.package_version.outputs.version }} - PYMC_CONSOLE_VERSION=${{ steps.console_release.outputs.version }} - PYMC_CONSOLE_CACHE_BUST=${{ steps.console_release.outputs.cache_bust }} + OPENHOP_CONSOLE_VERSION=${{ steps.console_release.outputs.version }} + OPENHOP_CONSOLE_CACHE_BUST=${{ steps.console_release.outputs.cache_bust }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha diff --git a/README.md b/README.md index ca943f7..479557f 100644 --- a/README.md +++ b/README.md @@ -429,12 +429,12 @@ that source as a directory, which breaks startup. docker compose up -d ``` -The Docker image bundles the optional PyMC Console frontend at +The Docker image bundles the optional openHop Console frontend at `/opt/pymc_console/web/html`. Local builds with `docker-compose.build.yml` -download the newest PyMC Console release by default. Set `PYMC_CONSOLE_VERSION` +download the newest openHop Console release by default. Set `OPENHOP_CONSOLE_VERSION` in `.env` to pin a release tag such as `v0.9.329`. -After the container starts, open Web Settings and choose `PyMC Console` as the +After the container starts, open Web Settings and choose `openHop Console` as the web frontend if you want the repeater to serve that UI. The existing `/api/check_pymc_console` endpoint should report that the Console path exists. diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 6ac020b..76e4337 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -10,4 +10,4 @@ services: DIALOUT_GID: ${DIALOUT_GID:-20} GPIO_GID: ${GPIO_GID:-986} SPI_GID: ${SPI_GID:-989} - PYMC_CONSOLE_VERSION: ${PYMC_CONSOLE_VERSION:-latest} + OPENHOP_CONSOLE_VERSION: ${OPENHOP_CONSOLE_VERSION:-${PYMC_CONSOLE_VERSION:-latest}} diff --git a/dockerfile b/dockerfile index 876a806..28d61c7 100644 --- a/dockerfile +++ b/dockerfile @@ -10,14 +10,14 @@ ARG GPIO_GID=986 ARG SPI_GID=989 ARG TARGETARCH ARG YQ_VERSION=v4.40.5 -ARG PYMC_CONSOLE_REPO=Treehouse-00/pymc_console-dist -ARG PYMC_CONSOLE_VERSION=latest -ARG PYMC_CONSOLE_CACHE_BUST=default +ARG OPENHOP_CONSOLE_REPO=Treehouse-00/pymc_console-dist +ARG OPENHOP_CONSOLE_VERSION=latest +ARG OPENHOP_CONSOLE_CACHE_BUST=default ENV INSTALL_DIR=/opt/openhop_repeater \ CONFIG_DIR=/etc/openhop_repeater \ DATA_DIR=/var/lib/openhop_repeater \ - PYMC_CONSOLE_WEB_DIR=/opt/pymc_console/web/html \ + OPENHOP_CONSOLE_WEB_DIR=/opt/pymc_console/web/html \ HOME_DIR=/home/${USER} \ PATH=/home/${USER}/.local/bin:${PATH} \ PYTHONUNBUFFERED=1 \ @@ -53,21 +53,21 @@ RUN arch="${TARGETARCH:-}" \ && wget -qO /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}" \ && chmod +x /usr/local/bin/yq -# Bundle the optional PyMC Console frontend so the web UI can select it without -# requiring a host bind mount. Use PYMC_CONSOLE_VERSION=latest to pull the +# Bundle the optional openHop Console frontend so the web UI can select it without +# requiring a host bind mount. Use OPENHOP_CONSOLE_VERSION=latest to pull the # newest release at image build time, or pin a tag such as v0.9.329. RUN set -eux; \ - echo "Bundling PyMC Console cache key: ${PYMC_CONSOLE_CACHE_BUST}"; \ - mkdir -p "${PYMC_CONSOLE_WEB_DIR}"; \ - if [ "${PYMC_CONSOLE_VERSION}" = "latest" ]; then \ - console_url="https://github.com/${PYMC_CONSOLE_REPO}/releases/latest/download/pymc-ui-latest.tar.gz"; \ + echo "Bundling openHop Console cache key: ${OPENHOP_CONSOLE_CACHE_BUST}"; \ + mkdir -p "${OPENHOP_CONSOLE_WEB_DIR}"; \ + if [ "${OPENHOP_CONSOLE_VERSION}" = "latest" ]; then \ + console_url="https://github.com/${OPENHOP_CONSOLE_REPO}/releases/latest/download/pymc-ui-latest.tar.gz"; \ else \ - console_url="https://github.com/${PYMC_CONSOLE_REPO}/releases/download/${PYMC_CONSOLE_VERSION}/pymc-ui-${PYMC_CONSOLE_VERSION}.tar.gz"; \ + console_url="https://github.com/${OPENHOP_CONSOLE_REPO}/releases/download/${OPENHOP_CONSOLE_VERSION}/pymc-ui-${OPENHOP_CONSOLE_VERSION}.tar.gz"; \ fi; \ wget -qO /tmp/pymc-console.tar.gz "${console_url}"; \ - tar -xzf /tmp/pymc-console.tar.gz -C "${PYMC_CONSOLE_WEB_DIR}"; \ + tar -xzf /tmp/pymc-console.tar.gz -C "${OPENHOP_CONSOLE_WEB_DIR}"; \ rm /tmp/pymc-console.tar.gz; \ - test -f "${PYMC_CONSOLE_WEB_DIR}/index.html" + test -f "${OPENHOP_CONSOLE_WEB_DIR}/index.html" # Create the group and user in order to run without root privileges RUN groupadd --gid "$PGID" "$GROUP" \ diff --git a/env.example b/env.example index bc317c0..c89b449 100644 --- a/env.example +++ b/env.example @@ -30,8 +30,8 @@ SPI_GID=989 PUID=15888 PGID=15888 -# Local build only. The Docker image bundles PyMC Console under +# Local build only. The Docker image bundles openHop Console under # /opt/pymc_console/web/html so it is available in Web Settings without a host -# bind mount. Use "latest" to pull the newest pyMC Console release at build +# bind mount. Use "latest" to pull the newest openHop Console release at build # time, or pin a tag such as v0.9.329. -PYMC_CONSOLE_VERSION=latest +OPENHOP_CONSOLE_VERSION=latest From bd6b45227dedd9240ed1eed37134a7461e956860 Mon Sep 17 00:00:00 2001 From: yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Wed, 19 Aug 2026 19:44:42 -0400 Subject: [PATCH 4/4] ci: constrain automatic Docker channel builds --- .github/workflows/docker-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 45c3772..9116e76 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -5,8 +5,6 @@ on: branches: - main - dev - tags: - - "v*" workflow_dispatch: inputs: image_repository: @@ -69,7 +67,7 @@ jobs: if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.image_repository }}" ]; then image_repository="${{ inputs.image_repository }}" elif [ "${{ github.repository_owner }}" = "yellowcooln" ]; then - image_repository="yellowcooln/pymc-repeater" + image_repository="yellowcooln/openhop-repeater" else image_repository="openhop/openhop-repeater" fi @@ -127,7 +125,9 @@ jobs: cache-to: type=gha,mode=max - name: Notify Home Assistant add-on repository - if: github.repository == 'openhop-dev/openhop_repeater' + if: >- + github.repository == 'openhop-dev/openhop_repeater' && + (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') env: DISPATCH_TOKEN: ${{ secrets.HA_ADDON_REPO_DISPATCH_TOKEN }} CHANNEL: ${{ github.ref_name }}