Registry Update #11
This file contains 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 ./daccs_node_registry/update.py | |
- name: commit changes to "current-registry" branch | |
run: | | |
git config user.name daccs-auto-update | |
git config user.email 4380924+mishaschwartz@users.noreply.github.com | |
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 "daccs registry update" && git push |