Skip to content

Commit d6191be

Browse files
Add files via upload
1 parent 30f1506 commit d6191be

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/traffic.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 12:45am
3+
# each day. In this case the traffic.py file located in the
4+
# main branch of this repository.
5+
6+
name: GitHub Metrics3
7+
8+
on:
9+
# push:
10+
# branches:
11+
# - main
12+
13+
schedule:
14+
- cron: '45 0 * * *' # Runs at 12:45am 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 traffic
32+
env:
33+
TOKEN: ${{ secrets.DATA_TOKEN }}
34+
run: python traffic.py # Extract GitHub traffic and append to CSV

0 commit comments

Comments
 (0)