self time update code attempt #13
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 Python Day Counter | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 8 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| update-day-counter: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: 🐍 Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: ▶️ Run day_counter.py | |
| working-directory: ./simple_py_program | |
| run: python day_counter.py | |
| - name: 📤 Commit and push if changed | |
| run: | | |
| git config --global user.name "1501henify" | |
| git config --global user.email "[email protected]" | |
| git add ../README.md | |
| git diff --cached --quiet || git commit -m "🔁 Updated day counter in README" | |
| git push | |
| continue-on-error: true |