Skip to content

Update Metrics

Update Metrics #3

Workflow file for this run

name: Update Metrics
on:
schedule:
- cron: '0 0 * * 0' # Runs every week on Sunday at midnight
workflow_dispatch: # Allows manual trigger
jobs:
update-metrics:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run update_metrics.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python update_metrics.py
- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit changes
run: |
git add README.md
git commit -m 'Update metrics in README.md'
git push
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}