Daily Webwright Prompt #42
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 Webwright Prompt | |
| on: | |
| workflow_dispatch: # Allows manual run from Actions tab | |
| schedule: | |
| - cron: '0 0 * * *' # Runs daily at midnight UTC | |
| permissions: | |
| contents: write # Needed to push commits back to repo | |
| jobs: | |
| rotate-prompt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Run rotation script | |
| run: | | |
| mkdir -p prompts | |
| python rotate_prompts.py | |
| - name: Commit changes | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add prompts/daily_prompt.txt | |
| git commit -m "Daily Webwright prompt update" || echo "No changes to commit" | |
| git push |