-
Notifications
You must be signed in to change notification settings - Fork 91
40 lines (32 loc) · 954 Bytes
/
Copy pathupdate-data.yml
File metadata and controls
40 lines (32 loc) · 954 Bytes
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
40
name: Update data
on:
schedule:
- cron: 35 11 * * * # 6:35 PM in Vietnam
jobs:
update-data:
if: github.repository_owner == 'khiemdoan'
runs-on: ubuntu-slim
steps:
- name: Checkout repo content
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dependencies
run: uv sync --frozen --no-dev --no-install-project
- name: Fetch data
run: uv run src/fetch.py
- name: Analyze data
run: uv run src/analyze.py
- name: Commit changes
run: |
if git diff --quiet; then
echo "No changes to commit"
exit 0
fi
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git add .
git commit -m "Updated $(date +'%Y-%m-%d')"
git push origin main