Skip to content

Scheduled NPS NAV Daily Fetch #29

Scheduled NPS NAV Daily Fetch

Scheduled NPS NAV Daily Fetch #29

Workflow file for this run

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 }}