Update README Nightly #465
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 README Nightly | |
| permissions: | |
| contents: write | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # This will run at midnight UTC every day | |
| workflow_dispatch: # This enables manual triggering from the UI | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.8' | |
| - name: Add packages | |
| run: pip install -r requirements.txt | |
| - name: Run plugin_search.py | |
| env: | |
| GITHUB_API_TOKEN: ${{ secrets.MY_GITHUB_API_TOKEN }} | |
| run: python plugin_search.py | |
| - name: Check if readme.md has changed | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git diff --exit-code readme.md || (git add readme.md && git commit -m "Update readme.md" && git push) |