Query GitHub Traffic Data #152
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
name: Query GitHub Traffic Data | |
on: | |
schedule: | |
# Runs at 23:30 UTC every day | |
- cron: '30 23 * * *' | |
workflow_dispatch: | |
jobs: | |
query-traffic-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Query Traffic Data | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: python query_github_traffic_data.py | |
- name: Commit and Push | |
run: | | |
git config --local user.email "noreply@github.com" | |
git config --local user.name "Bot" | |
git add data/* | |
git commit -m "data update" | |
git push |