Skip to content

feat(day 82): implement spooky-case converter replacing separators an… #88

feat(day 82): implement spooky-case converter replacing separators an…

feat(day 82): implement spooky-case converter replacing separators an… #88

name: Update Problem Count Badge
on:
push:
paths:
- "**.py"
workflow_dispatch:
permissions:
contents: write
jobs:
update-badge:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Count Python solution files
run: |
count=$(find . -type f -name "*.py" ! -path "./.github/*" ! -name "test_*.py" ! -name "*Test.py" | wc -l)
echo "{ \"problems\": $count }" > problem-count.json
- name: Commit updated badge data
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add problem-count.json
git commit -m "Update problem count badge" || echo "No changes to commit"
- name: Push changes
uses: ad-m/github-push-action@v0.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}