Scheduled Repo Search #8
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
| # File: .github/workflows/search.yml | |
| name: Cloudflare Worker Repository Search | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| workflow_dispatch: | |
| jobs: | |
| execute-search: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| # Explicitly target the nested requirements file so the cache hash doesn't fail | |
| cache-dependency-path: 'scripts/github/workflows/requirements.txt' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Execute the install targeting the exact explicit path | |
| python -m pip install -r scripts/github/workflows/requirements.txt | |
| - name: Run Search Script | |
| env: | |
| # Reverted to the native GitHub-provided token to avoid 401/403 errors | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: python scripts/github/workflows/search_repos.py | |
| - name: Upload Search Results Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: search-results-json | |
| path: scripts/github/workflows/results.json | |
| retention-days: 14 | |
| if-no-files-found: error |