Sync MeshCore Repeaters and Companions from MeshMapper/LetsMesh API #367
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r MeshCore/nodes/requirements.txt | |
| - name: Run Python script to check for MeshCore data updates | |
| run: python MeshCore/nodes/sync_data.py | |
| --repeaters-data-file MeshCore/nodes/repeaters.json | |
| - name: Commit data files if modified | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: 'MeshCore/nodes/repeaters.json' | |
| 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' |