Scheduled NPS NAV Daily Fetch #54
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: Scheduled NPS NAV Daily Fetch | |
on: | |
schedule: | |
# Runs at 11:00 AM IST every day, actions run on UTC | |
- cron: '30 05 * * *' | |
# Runs at 11:00 PM IST every day, actions run on UTC | |
- cron: '30 17 * * *' | |
workflow_dispatch: # Enables manual triggering | |
jobs: | |
fetch-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Run fetch.py | |
run: python scripts/fetch.py | |
- name: Commit and Push Changes | |
run: | | |
git config --global user.name "DailyUpdateBot" | |
git config --global user.email "bot@npsnav.in" | |
git add . | |
git commit -m "Daily NAV update by bot" || echo "No changes to commit" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |