Add: Math Rush (Addition Challenge) in Python #36
Workflow file for this run
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 Game Index | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| update-index: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Update INDEX.md | |
| run: | | |
| python update_index.py | |
| - name: Commit changes | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add INDEX.md | |
| if [[ -n "$(git status --porcelain INDEX.md)" ]]; then | |
| git commit -m "Auto-update INDEX.md with new games [skip ci]" | |
| git push | |
| else | |
| echo "No changes to INDEX.md" | |
| fi |