feat(day 82): implement spooky-case converter replacing separators an… #88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |