Registry Update #677
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: Registry Update | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.DACCS_NODE_REGISTRY_PAT }} | |
- name: Set up python for updating | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
- name: Install python dependencies | |
run: | | |
pip install -r ./requirements.txt | |
- name: Run update script | |
run: | | |
python3 ./marble_node_registry/update.py | |
- name: commit changes to "current-registry" branch | |
run: | | |
git config user.name marble-auto-update | |
git config user.email [email protected] | |
mv node_registry.json node_registry.json.backup | |
git fetch | |
git checkout current-registry | |
mv node_registry.json.backup node_registry.json | |
git add node_registry.json | |
git commit -m "marble registry update" && git push |