Skip to content

Track Repository Usage #13

Track Repository Usage

Track Repository Usage #13

Workflow file for this run

name: Track Repository Usage
on:
schedule:
- cron: "0 0 * * *" # Runs daily at midnight UTC
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
track_usage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Fetch repository traffic views
run: |
curl -H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
https://api.github.com/repos/PennSIVE/ComBatFamQC/traffic/views > views.json
- name: Fetch repository traffic clones
run: |
curl -H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
https://api.github.com/repos/PennSIVE/ComBatFamQC/traffic/clones > clones.json
- name: Commit and push data
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add views.json clones.json
git commit -m "Update traffic data [skip ci]"
git push