-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (40 loc) · 1.37 KB
/
lifetime_data.yml
File metadata and controls
48 lines (40 loc) · 1.37 KB
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
41
42
43
44
45
46
47
48
# Runs twice a month to collect fill repository history
# This updates the long-term health data used by the dashboard
name: Lifetime Data Collection
on:
schedule:
# Runs at midnight on the 1st and 15th of every month
- cron: "0 0 1,15 * *"
workflow_dispatch:
jobs:
collect-lifetime-data:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
# Checkout the Data_Updates branch (never push to main)
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: Data_Updates
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
# Install project dependencies
- name: Install dependencies
run: pip install -r ./docs/requirements.txt
# Run data collection in lifetime mode
- name: Run lifetime data collection
env:
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
run: python -m Backend.dataCollection.collectData --mode lifetime
# Commit and push updated JSON file
- name: Commit and push changes
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"
git add data/lifetime_data.json
git commit -m "Update lifetime repository data"
git push origin Data_Updates