-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30f1506
commit d6191be
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This workflow initializes a Python environment and executes | ||
# the specified .py file/s at a scheduled time of 12:45am | ||
# each day. In this case the traffic.py file located in the | ||
# main branch of this repository. | ||
|
||
name: GitHub Metrics3 | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - main | ||
|
||
schedule: | ||
- cron: '45 0 * * *' # Runs at 12:45am UTC every day | ||
|
||
jobs: | ||
extract-data: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements.txt # Contains any dependencies that are not part of the Python standard library | ||
- name: Run Python script to extract traffic | ||
env: | ||
TOKEN: ${{ secrets.DATA_TOKEN }} | ||
run: python traffic.py # Extract GitHub traffic and append to CSV |