Daily Auto Commit #74
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: Daily Auto Commit | |
| on: | |
| schedule: | |
| # run at 2:00 AM every day (UTC time) | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: # allows manual triggering of the workflow from the GitHub Actions tab | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # allows the workflow to push changes to the repository | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Run script | |
| run: python auto_commit.py | |
| - name: Push changes | |
| run: git push origin main |