-
-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (32 loc) · 986 Bytes
/
daily-fetch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 }}