Repository navigation
Sync MeshCore Repeaters and Companions from online sources #82
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 online sources | |
| 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.GH_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 update MeshCore nodes data | |
| run: python meshcore/nodes/sync_nodes.py | |
| --nodes-data-file meshcore/nodes/nodes.json | |
| - name: Prepare MeshMapper config | |
| run: | | |
| echo ${{ secrets.MESHMAPPER_CONFIG_BASE64 }} | base64 -d > meshmapper_config.json | |
| - name: Run Python script to update MeshCore coverage data | |
| run: python meshcore/nodes/sync_coverage.py | |
| --config-file meshmapper_config.json | |
| --coverage-data-file meshcore/nodes/coverage.json | |
| - name: Commit data files if modified | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: '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' |