From a59e551f4ae3aad9adef6639bb7762081886d0d1 Mon Sep 17 00:00:00 2001 From: ElektroVodka <211697683+Elektr0Vodka@users.noreply.github.com> Date: Tue, 1 Dec 2026 18:44:22 +0100 Subject: [PATCH] ci: keep workflows inside this repository Drop everything that targets a repository or domain that is not ours: - github-pages: published the upstream docs with the docs.meshcore.io CNAME - stale-bot: only ever ran on meshcore-dev/MeshCore - check-mqtt-preset-parity: compares two agessaman branches we do not have - build-observer-firmwares: the agessaman/flasher.meshcore.io checkout, its FLASHER_DISPATCH_TOKEN and the config/doc push; no longer starts on a tag --- .../workflows/build-observer-firmwares.yml | 56 +---------- .../workflows/check-mqtt-preset-parity.yml | 94 ------------------- .github/workflows/github-pages.yml | 36 ------- .github/workflows/stale-bot.yml | 32 ------- 4 files changed, 2 insertions(+), 216 deletions(-) delete mode 100644 .github/workflows/check-mqtt-preset-parity.yml delete mode 100644 .github/workflows/github-pages.yml delete mode 100644 .github/workflows/stale-bot.yml diff --git a/.github/workflows/build-observer-firmwares.yml b/.github/workflows/build-observer-firmwares.yml index 72181b68191..17bdf7cb919 100644 --- a/.github/workflows/build-observer-firmwares.yml +++ b/.github/workflows/build-observer-firmwares.yml @@ -5,17 +5,9 @@ permissions: on: workflow_dispatch: - push: - tags: - # Trigger only — the embedded version comes from FIRMWARE_VERSION below, - # NOT from the tag. Push e.g. `observer-mqtt-v1.17.0` to kick a rolling - # build from this branch (the Run-workflow button lives on the default - # branch; a tag push works regardless of which branch the file is on). - - 'observer-mqtt-*' env: - # Version embedded in firmware filenames; must match the version key in the - # flasher's config.json. Bump here when the observer version changes. + # Version embedded in firmware filenames. Bump here when the observer version changes. FIRMWARE_VERSION: v1.18.0 # Rolling release tag that hosts the latest observer binaries. RELEASE_TAG: observer-mqtt-latest @@ -90,8 +82,7 @@ jobs: path: out if-no-files-found: error - # Collect all shard outputs, publish the rolling release, then point the - # flasher at the new build by bumping the hash + notes in its config.json. + # Collect all shard outputs and publish the rolling release in this repository. release: needs: build runs-on: ubuntu-latest @@ -110,10 +101,6 @@ jobs: find artifacts -type f -name '*.bin' -exec cp -f {} out/ \; echo "Collected binaries:"; ls -1 out - - name: Compute Short SHA - id: sha - run: echo "short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" - - name: Publish to Rolling Release (tag pinned; assets replaced in place) env: GH_TOKEN: ${{ github.token }} @@ -136,42 +123,3 @@ jobs: | while read -r asset; do grep -qxF "$asset" <<<"$keep" || gh release delete-asset "$RELEASE_TAG" "$asset" --yes || true done - - - name: Checkout Flasher Repo - uses: actions/checkout@v4 - with: - repository: agessaman/flasher.meshcore.io - token: ${{ secrets.FLASHER_DISPATCH_TOKEN }} - path: flasher - - - name: Update Flasher Config - run: | - python3 flasher/scripts/update-firmware.py \ - "${{ steps.sha.outputs.short }}" \ - "$GITHUB_WORKSPACE/firmware-notes.html" - - - name: Sync Docs into Flasher - run: | - # docs.html on the flasher site serves these raw .md files and renders - # them client-side; keep this list in sync with LOCAL_DOCS in - # flasher/docs.html. - for f in MQTT_IMPLEMENTATION.md MQTT_SNMP.md ALERTS.md; do - if [ -f "$f" ]; then - cp -f "$f" "flasher/$f" - echo "synced $f" - else - echo "WARNING: source doc $f not found" >&2 - fi - done - - - name: Commit & Push Flasher Config - working-directory: flasher - run: | - if git diff --quiet; then - echo "No flasher changes to commit." - exit 0 - fi - git config user.name "meshcore-bot" - git config user.email "noreply@gessaman.com" - git commit -am "Update observer firmware to ${{ steps.sha.outputs.short }}" - git push diff --git a/.github/workflows/check-mqtt-preset-parity.yml b/.github/workflows/check-mqtt-preset-parity.yml deleted file mode 100644 index 7b7d663de4a..00000000000 --- a/.github/workflows/check-mqtt-preset-parity.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Check MQTT Preset Name Parity - -# Ensures observer-firmware and observer-firmware-dev ship an identical -# src/helpers/MQTTPresets.h. A slot's preset is stored in /mqtt.json by name, and -# firmware that does not know a name repairs it to "none" and writes the file -# back, so a node that rolls back between channels loses that slot for good. -# Behaviour that differs per channel belongs in MQTTPresetPolicy.h, which is not -# compared. See scripts/check_mqtt_preset_parity.py. - -permissions: - contents: read - -on: - workflow_dispatch: - pull_request: - branches: - - observer-firmware - - observer-firmware-dev - paths: - - 'src/helpers/MQTTPresets.h' - - 'scripts/check_mqtt_preset_parity.py' - - '.github/workflows/check-mqtt-preset-parity.yml' - push: - branches: - - observer-firmware - - observer-firmware-dev - paths: - - 'src/helpers/MQTTPresets.h' - - 'scripts/check_mqtt_preset_parity.py' - - '.github/workflows/check-mqtt-preset-parity.yml' - -jobs: - parity: - runs-on: ubuntu-latest - steps: - - name: Clone Repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Fetch channel branches - run: | - git fetch --no-tags origin observer-firmware observer-firmware-dev - - - name: Materialize presets from both channels - env: - EVENT_NAME: ${{ github.event_name }} - PR_BASE: ${{ github.event.pull_request.base.ref }} - PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} - run: | - set -euo pipefail - PRESET_PATH=src/helpers/MQTTPresets.h - mkdir -p /tmp/preset-parity - - if [ "$EVENT_NAME" = "pull_request" ]; then - # Ensure the PR head commit is reachable (merge checkout may not keep it). - git fetch --no-tags origin "$PR_HEAD_SHA" - # Proposed state of the PR's base channel vs current tip of the sibling. - git show "${PR_HEAD_SHA}:${PRESET_PATH}" > /tmp/preset-parity/pr-head.h - case "$PR_BASE" in - observer-firmware-dev) - cp /tmp/preset-parity/pr-head.h /tmp/preset-parity/dev.h - git show "origin/observer-firmware:${PRESET_PATH}" > /tmp/preset-parity/prod.h - ;; - observer-firmware) - git show "origin/observer-firmware-dev:${PRESET_PATH}" > /tmp/preset-parity/dev.h - cp /tmp/preset-parity/pr-head.h /tmp/preset-parity/prod.h - ;; - *) - echo "::error::unexpected PR base branch: $PR_BASE" >&2 - exit 1 - ;; - esac - else - # push / workflow_dispatch: compare current channel tips. - git show "origin/observer-firmware:${PRESET_PATH}" > /tmp/preset-parity/prod.h - git show "origin/observer-firmware-dev:${PRESET_PATH}" > /tmp/preset-parity/dev.h - fi - - echo "=== production (observer-firmware) head preview ===" - head -n 5 /tmp/preset-parity/prod.h - echo "=== dev (observer-firmware-dev) head preview ===" - head -n 5 /tmp/preset-parity/dev.h - - - name: Self-test checker - run: python3 scripts/check_mqtt_preset_parity.py --self-test - - - name: Compare preset tables - run: | - python3 scripts/check_mqtt_preset_parity.py --exact \ - /tmp/preset-parity/prod.h \ - /tmp/preset-parity/dev.h \ - --label-a observer-firmware \ - --label-b observer-firmware-dev diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml deleted file mode 100644 index b01ddc939cd..00000000000 --- a/.github/workflows/github-pages.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build and deploy Docs site to GitHub Pages - -on: - workflow_dispatch: - push: - branches: - - main - -permissions: - contents: write - -jobs: - github-pages: - runs-on: ubuntu-latest - steps: - - - name: Checkout Repo - uses: actions/checkout@v6 - - - name: Setup Python - uses: actions/setup-python@v6 - with: - python-version: '3.13' - - - name: Build - run: | - pip install mkdocs-material - mkdocs build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4.1.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - cname: docs.meshcore.io - publish_dir: ./site - publish_branch: 'gh-pages' diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml deleted file mode 100644 index ec166587563..00000000000 --- a/.github/workflows/stale-bot.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: 'Run Stale Bot' -on: - schedule: - - cron: '30 1 * * *' # daily at 1:30am - workflow_dispatch: {} - -permissions: - actions: write - issues: write - pull-requests: write - -jobs: - close-issues: - # only run on main repo, not forks - if: github.repository == 'meshcore-dev/MeshCore' - runs-on: ubuntu-latest - steps: - - name: Close Stale Issues - uses: actions/stale@v10 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - # auto close issues - days-before-issue-stale: 60 - days-before-issue-close: 7 - exempt-issue-labels: "keep-open" - stale-issue-label: "stale" - stale-issue-message: "This issue is stale because it has been open for 60 days with no activity. Remove the stale label or add a comment if this issue is still relevant, otherwise this issue will automatically close in 7 days." - close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale." - # don't auto close prs - days-before-pr-stale: -1 - days-before-pr-close: -1 - \ No newline at end of file