Skip to content

Update update-progress.yml #25

Update update-progress.yml

Update update-progress.yml #25

name: Update Progress Badge
on:
push:
branches:
- main
workflow_dispatch: # Manual trigger option
jobs:
update-progress-badge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install requests pybadges matplotlib
- name: Calculate Progress and Update README
run: |
python src/calculate_progress.py \
--owner "${{ github.repository_owner }}" \
--token "${{ secrets.GITHUB_TOKEN }}" \
--readme-path "README.md" \
--badge-path "progress.svg"
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "GitHub Actions"
git add README.md progress.svg progress_graph.png
git diff-index --quiet HEAD || git commit -m "Update progress badge and graph"
- name: Pull changes
run: git pull -r
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}