Skip to content

Sync MeshCore Repeaters and Companions from online sources #214

Sync MeshCore Repeaters and Companions from online sources

Sync MeshCore Repeaters and Companions from online sources #214

name: Sync MeshCore Repeaters and Companions from MeshMapper/LetsMesh API
on:
schedule:
# Runs every hour at minute 0
- cron: "0 * * * *"
workflow_dispatch: ~ # Allows manual triggering
permissions:
contents: write
pull-requests: write
jobs:
sync-meshcore-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Update version number
uses: jacobtomlinson/gha-find-replace@2.0.0
with:
find: "VERSIONADDEDBYGITHUB"
replace: "0.0.1" # Just a placeholder needed to install the local package
regex: false
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r data/meshcore/nodes/requirements.txt
pip install -e .
- name: Run Python script to update MeshCore nodes data
run: python data/meshcore/nodes/sync_nodes.py
--nodes-data-file data/meshcore/nodes/nodes.json
- name: Run Python script to update MeshCore coverage data
run: python data/meshcore/nodes/sync_coverage.py
--coverage-data-file data/meshcore/nodes/coverage.json
- name: Commit data files if modified
uses: EndBug/add-and-commit@v9
with:
add: 'data/meshcore'
default_author: github_actions
message: "MeshCore data updated [skip actions]" # https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
push: '--force'