GitHub Activity Metrics #59
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
# This workflow initializes a Python environment and executes | |
# the specified .py file/s at a scheduled time of midnight | |
# each day. In this case the activity.py file located in the | |
# /src directory of this repository. | |
name: GitHub Activity Metrics | |
on: | |
# push: | |
# branches: | |
# - main | |
schedule: | |
- cron: '1 0 * * *' # Runs at one past midnight 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 activity | |
env: | |
TOKEN: ${{ secrets.DATA_TOKEN }} | |
run: python src/activity.py # Extract GitHub activity and append to CSV |