Discover Packages #10
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: Discover Packages | |
| on: | |
| schedule: | |
| - cron: "0 6 * * 0" # Weekly on Sunday at 6 AM UTC | |
| workflow_dispatch: | |
| jobs: | |
| discover: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Discover PyPI packages | |
| run: uv run python scripts/discover_packages.py | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add static/data/packages.json | |
| git diff --quiet && git diff --staged --quiet || git commit -m "Update package discovery $(date +%Y-%m-%d)" | |
| git pull --rebase | |
| git push |