From e06bd756ee78ac74cee3a6527b1a42877f42eadc Mon Sep 17 00:00:00 2001 From: agessaman Date: Sun, 19 Jul 2026 21:25:07 -0700 Subject: [PATCH] ci: source slim manifests from build output; accept observer-firmware branch name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flip gen-slim-manifests.py to its new --bin-dir mode (flasher repo PR #1): the slim OTA manifests are now generated from out/ — the assets actually uploaded to the release — instead of the config.json entries, which the /releases feed migration will convert to github release defs. STATIC_PATH joins the workflow env; it must stay consistent with config.json's staticPath. Also add observer-firmware alongside mqtt-bridge-implementation-flex in both push triggers, ahead of renaming the branch: GitHub does not rewrite branch filters on rename, and a rename with only the old name in the filter silently stops production publishing. The old name is dropped once a publish is verified on the new one. Workflow-only commit (.github/** is in paths-ignore): pushing this triggers no build. --- .github/workflows/build-observer-firmwares.yml | 18 ++++++++++++++---- .github/workflows/sync-flasher-content.yml | 4 ++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-observer-firmwares.yml b/.github/workflows/build-observer-firmwares.yml index 3c13bf0c..6e7beee5 100644 --- a/.github/workflows/build-observer-firmwares.yml +++ b/.github/workflows/build-observer-firmwares.yml @@ -7,7 +7,11 @@ on: workflow_dispatch: push: branches: + # Both names during the flex -> observer-firmware rename: GitHub does not + # rewrite branch filters on rename, so the old name is kept until a + # publish is verified on the new one (then it gets dropped). - mqtt-bridge-implementation-flex + - observer-firmware # Only rebuild firmware when something that affects the binaries changes. # Docs, the changelog, the changelog generator, CI files, and repo-meta # files do not change firmware output — docs/changelog are handled by @@ -38,6 +42,10 @@ env: FIRMWARE_VERSION: v1.16.0 # Rolling release tag that hosts the latest observer binaries. RELEASE_TAG: observer-mqtt-latest + # Download host serving RELEASE_TAG's assets (cloudflare-worker in the flasher + # repo). Baked into the slim OTA manifests' file URLs; must stay consistent + # with config.json's staticPath. + STATIC_PATH: https://observer-fw.gessaman.com jobs: @@ -233,11 +241,13 @@ jobs: BUILD_NUMBER: ${{ needs.enumerate.outputs.build_number }} run: | # Derive the slim per-variant manifests (flasher/v/.json) that the - # firmware fetches for `ota check`/`ota update`, from the just-updated - # config.json (single source of truth), stamping this build's number. - # Then persist the counter so the next run increments from here. + # firmware fetches for `ota check`/`ota update`, from the build output + # in out/ — the assets actually uploaded to the release — stamping this + # build's number. Then persist the counter so the next run increments + # from here. python3 flasher/scripts/gen-slim-manifests.py \ - --config flasher/config.json \ + --bin-dir out \ + --static-path "$STATIC_PATH" \ --out-dir flasher/v \ --base-version "$FIRMWARE_VERSION" \ --build "$BUILD_NUMBER" \ diff --git a/.github/workflows/sync-flasher-content.yml b/.github/workflows/sync-flasher-content.yml index e2bd5033..cd3c8428 100644 --- a/.github/workflows/sync-flasher-content.yml +++ b/.github/workflows/sync-flasher-content.yml @@ -14,7 +14,11 @@ on: workflow_dispatch: push: branches: + # Both names during the flex -> observer-firmware rename: GitHub does not + # rewrite branch filters on rename, so the old name is kept until a + # publish is verified on the new one (then it gets dropped). - mqtt-bridge-implementation-flex + - observer-firmware paths: - '**.md' - 'docs/**'