Sync Chain Registry #23045
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: Sync Chain Registry | |
on: | |
schedule: | |
- cron: '*/15 * * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
sync-chain-registry: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests python-dotenv | |
- name: Create Necessary Directories | |
run: mkdir -p ../_IBC || true | |
- name: Fetch and Sync Files | |
run: python ./scripts/sync_chain_registry.py | |
- name: Commit and Push Changes | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add -A | |
git commit -m "Sync Cosmoshub files" || echo "No changes to commit" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |