-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (39 loc) · 1.07 KB
/
update-stats.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: Update statistics MD file
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 2 * *'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run statistics generation script
run: |
cd scripts; python generate_stats_md_file.py
- name: Set up Git user
run: git config --global user.email "[email protected]"; git config --global user.name "GHActionBot"
- name: Commit update
run: git commit -am "Sync stats data"; git push
- name: Attach generated artefacts
uses: actions/upload-artifact@v4
with:
name: data
path: |
data/data.db
data/input.csv
stats.md