Skip to content

Commit e2a1dbf

Browse files
Add files via upload
1 parent bd6092e commit e2a1dbf

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/activity.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow initializes a Python environment and executes
2+
# the specified .py file/s at a scheduled time of midnight
3+
# each day. In this case the activity.py file located in the
4+
# /src directory of this repository.
5+
6+
name: GitHub Activity Metrics
7+
8+
on:
9+
# push:
10+
# branches:
11+
# - main
12+
13+
schedule:
14+
- cron: '0 0 * * *' # Runs at midnight UTC every day
15+
16+
jobs:
17+
extract-data:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: '3.10'
28+
29+
- name: Install dependencies
30+
run: pip install -r requirements.txt # Contains any dependencies that are not part of the Python standard library
31+
- name: Run Python script to extract activity
32+
env:
33+
TOKEN: ${{ secrets.DATA_TOKEN }}
34+
run: python src/activity.py # Extract GitHub activity and append to CSV

0 commit comments

Comments
 (0)