Skip to content

Update Infrastructure Data #10336

Update Infrastructure Data

Update Infrastructure Data #10336

name: Update Infrastructure Data
on:
schedule:
- cron: "0 * * * *" # Runs every hour
workflow_dispatch:
jobs:
update-infrastructure:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run update_data script
run: python namada/update_data.py
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "actions@github.com"
git add namada/infrastructure.json
git diff --staged --quiet || git commit -m "Automated update of infrastructure.json"
git push