Skip to content

added

added #768

Workflow file for this run

name: Update README with Problem Count
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Count problems solved
run: |
PROBLEM_COUNT=$(find . -type f \( -name "*.cpp" -o -name "*.c" -o -name "*.py" \) | wc -l)
echo "Total Problems Solved: $PROBLEM_COUNT"
sed -i "s/Total Problems Solved: {count}/Total Problems Solved: $PROBLEM_COUNT/" README.md
- name: Commit and push changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add README.md
git commit -m "Updated problem count in README" || exit 0
git push